Function

CFStringConvertIANACharSetNameToEncoding

Returns the Core Foundation encoding constant that is the closest mapping to a given IANA registry “charset” name.

Declaration

CFStringEncoding CFStringConvertIANACharSetNameToEncoding(CFStringRef theString);

Parameters

IANAName

The IANA “charset” name to use.

Return Value

The Core Foundation string encoding that is closest to the IANA “charset” IANAName. Returns the kCFStringEncodingInvalidId constant if the name is not recognized.

Discussion

The CFStringConvertEncodingToIANACharSetName function is complementary to this function.

See Also

Working With Encodings

CFStringConvertEncodingToIANACharSetName

Returns the name of the IANA registry “charset” that is the closest mapping to a specified string encoding.

CFStringConvertEncodingToNSStringEncoding

Returns the Cocoa encoding constant that maps most closely to a given Core Foundation encoding constant.

CFStringConvertEncodingToWindowsCodepage

Returns the Windows codepage identifier that maps most closely to a given Core Foundation encoding constant.

CFStringConvertNSStringEncodingToEncoding

Returns the Core Foundation encoding constant that is the closest mapping to a given Cocoa encoding.

CFStringConvertWindowsCodepageToEncoding

Returns the Core Foundation encoding constant that is the closest mapping to a given Windows codepage identifier.

CFStringGetFastestEncoding

Returns for a CFString object the character encoding that requires the least conversion time.

CFStringGetListOfAvailableEncodings

Returns a pointer to a list of string encodings supported by the current system.

CFStringGetMaximumSizeForEncoding

Returns the maximum number of bytes a string of a specified length (in Unicode characters) will take up if encoded in a specified encoding.

CFStringGetMostCompatibleMacStringEncoding

Returns the most compatible Mac OS script value for the given input encoding.

CFStringGetNameOfEncoding

Returns the canonical name of a specified string encoding.

CFStringGetSmallestEncoding

Returns the smallest encoding on the current system for the character contents of a string.

CFStringGetSystemEncoding

Returns the default encoding used by the operating system when it creates strings.

CFStringIsEncodingAvailable

Determines whether a given Core Foundation string encoding is available on the current system.