[fpc-devel] TField.AsString and Databases with UTF-8 charset
Michael Van Canneyt
michael at freepascal.org
Fri Jul 24 16:17:26 CEST 2009
On Fri, 24 Jul 2009, Martin Schreiber wrote:
> 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
>> 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.
I know, but I'm afraid of the huge memory usage and fragmentation it IMHO
inevitably leads to. That's why I'm looking for an alternate solution at a
Somehow Delphi 2009 must also be confronted with this, with their native
unicode support. Hm.
More information about the fpc-devel