Reinier Olislagers schrieb:
On 14-7-2013 8:00, Daniel Simoes de Ameida wrote:
When the FieldDefs.Size properties is defined and we are trying to save
UTF8 characters with accented words, the Data is Truncated.
Could be because UTF8 with accented characters may result in multiple
bytes per character.
If the size is too small, the number of bytes passed to the db won't fit.

The difference between specifying size in bytes and in characters still
needs to be addressed.
AFAIR, there's already a bug open for this.

Workaround: make your field size as large as the maximum number of UTF8
bytes you expect.

Another workaround: use the appropriate codepage for storing strings in the database, so that all characters are single bytes. With the new (encoded) AnsiStrings this should be quite easy (automatic conversion).

DoDi


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to