[fpc-devel] TStringField, String and UnicodeString and UTF8String
José Mejuto
joshyfun at gmail.com
Thu Jan 13 13:51:53 CET 2011
Hello FPC,
Thursday, January 13, 2011, 1:01:57 PM, you wrote:
L> Also it seems to me, that when you call ANSI version of ODBC API
L> functions, then you receive data in ANSI encoding.
L> If it is so, then it is always safe use ansitoutf8() (or UTF8Encode())
L> on receved data.
No, because ANSI is not UTF-* so any char outside of your ANSI
codepage will be discarded or generate and exception, or whatever the
developer decides (driver developer).
L> In Windows we get UTF-16, in Linux/UNIX we get UTF-8
If you use ANSI calls in linux you will receive UTF8 because in most
linux the ANSI page is UTF8. If you call the *W APIs you MUST receive
WideString or PWideCharArray or alike, or the API will not work.
--
Best regards,
José
More information about the fpc-devel
mailing list