---
title: "CFStringConvertEncodingToIANACharSetName(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfstringconvertencodingtoianacharsetname(_:)"
---

# CFStringConvertEncodingToIANACharSetName(_:)

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

## Declaration

```swift
func CFStringConvertEncodingToIANACharSetName(_ encoding: CFStringEncoding) -> CFString!
```

## Parameters

- `encoding`: The Core Foundation string encoding to use.

## Return Value

Return Value The name of the IANA “charset” that is the closest mapping to encoding. Returns NULL if the encoding is not recognized.

## Discussion

Discussion The CFStringConvertIANACharSetNameToEncoding(_:) function is complementary to this function.

## See Also

### Working With Encodings

- [CFStringConvertEncodingToNSStringEncoding(_:)](corefoundation/cfstringconvertencodingtonsstringencoding(_:).md)
- [CFStringConvertEncodingToWindowsCodepage(_:)](corefoundation/cfstringconvertencodingtowindowscodepage(_:).md)
- [CFStringConvertIANACharSetNameToEncoding(_:)](corefoundation/cfstringconvertianacharsetnametoencoding(_:).md)
- [CFStringConvertNSStringEncodingToEncoding(_:)](corefoundation/cfstringconvertnsstringencodingtoencoding(_:).md)
- [CFStringConvertWindowsCodepageToEncoding(_:)](corefoundation/cfstringconvertwindowscodepagetoencoding(_:).md)
- [CFStringGetFastestEncoding(_:)](corefoundation/cfstringgetfastestencoding(_:).md)
- [CFStringGetListOfAvailableEncodings()](corefoundation/cfstringgetlistofavailableencodings().md)
- [CFStringGetMaximumSizeForEncoding(_:_:)](corefoundation/cfstringgetmaximumsizeforencoding(_:_:).md)
- [CFStringGetMostCompatibleMacStringEncoding(_:)](corefoundation/cfstringgetmostcompatiblemacstringencoding(_:).md)
- [CFStringGetNameOfEncoding(_:)](corefoundation/cfstringgetnameofencoding(_:).md)
- [CFStringGetSmallestEncoding(_:)](corefoundation/cfstringgetsmallestencoding(_:).md)
- [CFStringGetSystemEncoding()](corefoundation/cfstringgetsystemencoding().md)
- [CFStringIsEncodingAvailable(_:)](corefoundation/cfstringisencodingavailable(_:).md)
