Core Foundation String Services supports conversions between Unicode encodings of CFString objects and a wide range of international, national, and industry encodings. Supported encodings come in two sets, an "internal" set defined in
CFString.h
and an "external" set defined in
CFStringEncodingExt.h
. The encodings in the internal set are guaranteed to be available on all platforms for conversions to and from CFString objects. These encodings (as designated by their
enum
constant names) are
Conversions using the encodings in the external set are possible only if the underlying system supports the encodings.
The encodings of String Services parallel those used by the Mac OS 8.x Text Encoding Converter. The
CFStringEncoding
type defines encoding values that are equal to those defined by Mac OS 8.x for the equivalent
TextEncoding
data type. For example, Core Foundation's
kCFStringEncodingMacRoman
is the same integer value as
kTextEncodingMacRoman
.
String Services also provides special conversion facilities for Cocoa encodings for NSString objects, for Windows code pages, and for IANA registry character set names.