[fpc-devel] TField.AsString and Databases with UTF-8 charset
Martin Schreiber
fpmse at bluewin.ch
Fri Jul 24 16:02:16 CEST 2009
On Friday 24 July 2009 15:31:32 Michael Van Canneyt wrote:
> On Fri, 24 Jul 2009, Graeme Geldenhuys wrote:
>
> As a consequence, my prediction is that, because it reports a size in
> characters, the postgres implementation will suffer of buffer overflows as
> soon as strange (=multibyte) unicode characters are returned.
> Whereas the firebird implementation will not buffer overflow since it
> returns a size in bytes (but instead it suffers from the problem you
> encountered).
>
Correct.
> We need to foresee the possibility where the size in characters is
> different from the size in bytes. If I am correct, the TWideStringField
> accomodates for this, it uses a character size of 2.
>
Graeme will not accept it because he wants to use ancient Greek and Klingon
AFAIK. ;-)
MSEgui uses variable size storage for strings in tmsebufdataset. It was
difficult to implement but it is worth the effort.
Martin
More information about the fpc-devel
mailing list