[fpc-devel] TField.AsString and Databases with UTF-8 charset

Martin Schreiber fpmse at bluewin.ch
Fri Jul 24 13:11:43 CEST 2009


On Friday 24 July 2009 12:49:51 Graeme Geldenhuys wrote:
>
> 2) The UTF-8 implementation of Firebird is seriously flawed. Firebird
> makes as if UTF-8 is a fixed byte algorithm and just returns rubbish
> results from a Char(x) field and breaks the DDL rule of what the maximum
> character length is. Using the metadata, SqlDB *can* fixes this by using
> something like:  copy(fieldvalue, 0, MaxCharacterLength)
>
Applies for UNICODE_FSS not UTF8. As I wrote before:
"
Firebird trims CHAR fields for UTF8 to character length (byte length = 
4*character length) and with the old UNICODE_FSS to byte length (= 
3*character length), see
http://www.destructor.de/firebird/charsets.htm
"

Martin



More information about the fpc-devel mailing list