[Lazarus] Losing data when saving Database fileds with "Size" defined and UTF8 chars

Reinier Olislagers reinierolislagers at gmail.com
Mon Jul 15 11:39:50 CEST 2013

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.

More information about the Lazarus mailing list