Besides the functions that convert between encodings, String Services offers a number of functions that can help you to find out which encodings are available and, of these, which are the best to use in your code.
CFStringGetSmallestEncoding
function determines the smallest encoding that can be used on a particular system (smallest in terms of bytes needed to represent one character). The
CFStringGetFastestEncoding
function gets the encoding on the current system with the fastest conversion time from Unicode. The
CFStringGetSystemEncoding
function obtains the encoding used by strings generated by the operating system.
CFStringIsEncodingAvailable
and
CFStringGetListOfAvailableEncodings
functions to obtain information about encodings available on your system.
CFStringConvertEncodingToWindowsCodepage
and
CFStringConvertWindowsCodepageToEncoding
functions to convert between Windows codepage numbers and
CFStringEncoding
values. Similar sets of functions exist for Cocoa NSString encoding constants and IANA "charset" identifiers used by MIME encodings.