On 11 Nov 2009, at 23:54, Tomas Hajny wrote:
Are character sets recognized by numeric values under Mac OS X?
There are two ways to deal with them. One is libiconv, like on any
*nix platform (which, afaik, only supports string identifiers). The
other is CFString, which uses numeric values: http://developer.apple.com/mac/library/documentation/CoreFoundation/Reference/CFStringRef/Reference/reference.html#//apple_ref/doc/constant_group/External_String_Encodings
Mac OS X also has some helper routines that they (and we) may use
though (especially the second and the fourth one):
CFStringConvertEncodingToIANACharSetName
CFStringConvertEncodingToWindowsCodepage
CFStringConvertIANACharSetNameToEncoding
CFStringConvertWindowsCodepageToEncoding
I didn't know about them until I looked up the CFString reference.
It's quite unfortunate that the new unicodestring type that Delphi
added isn't opaque, since then we could just have used CFString on Mac
OS X (instead of constantly creating and destroying CFStrings when we
have to convert from one code page to another).
Jonas
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel