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

Joost van der Sluis joost at cnoc.nl
Thu Jan 13 16:24:31 CET 2011


On Thu, 2011-01-13 at 15:55 +0100, José Mejuto wrote:
> 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 ?

See my mail to Lacak about the two options to solve this.

Joost.




More information about the fpc-devel mailing list