Contents

CFStringConvertIANACharSetNameToEncoding(_:)

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

Declaration

func CFStringConvertIANACharSetNameToEncoding(_ theString: CFString!) -> CFStringEncoding

Parameters

  • theString:

    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