[fpc-devel] TStringField, String and UnicodeString and UTF8String

José Mejuto joshyfun at gmail.com
Thu Jan 13 15:55:29 CET 2011


Hello FPC,

Thursday, January 13, 2011, 2:58:30 PM, you wrote:

JvdS> Then that option has to be added. I think it's already possible but you
JvdS> simply don't know how. (Sql-Server is ODBC only, so that one is fixed.
JvdS> For firebird there's a 'serverencoding' parameter, or something like
JvdS> that. Postgres also has some setting.

Are you aware about the Firebird Field(UTF8) and SQLConnection
CharSet(UTF8) problem ?

Table X
-------
  FieldTestName Varchar(5) UTF8

IBConnection
-------
  CharSet = UTF8

//Source code file is UTF8 encoded.
DataSource.FieldByName('FieldTestName').AsString='ÑÑÑÑÑ';

This raises an exception because the string is 10 bytes and the field
only allow 5 chars.

I think I had read this comment many months ago and answered as "won'n
fix" for Interbase compatibility. Am I wrong ?
  
-- 
Best regards,
 José




More information about the fpc-devel mailing list