[fpc-devel] TFieldDef.Size vs TField.Size

Hans-Peter Diettrich DrDiettrich1 at aol.com
Thu Feb 24 16:35:04 CET 2011


Joost van der Sluis schrieb:

> I did some tests with different Delphi versions, with and without
> unicode. And beside finding some bugs in XE's string-db code I think I
> know a solution for all problems regarding strings and unicode.

Good luck :-)

> But let me thing it out, write tests, write code and test if it works
> indeed.

Just an idea:

First decision is made by the DB layouter, to use fixed-size fields or 
blobs for strings. Then a fixed DB field size imposes another limit on 
the maximum character count, depending on the encoding. Chinese users 
would be happier with a *word* count, or about 4 bytes per visual *glyph*.

With blobs any limit is questionable, at least it should strictly denote 
the number of visual characters - maybe Unicode codepoints?

DoDi



More information about the fpc-devel mailing list