---
title: CFStringEncoding
framework: corefoundation
role: symbol
role_heading: Type Alias
path: corefoundation/cfstringencoding
---

# CFStringEncoding

An integer type for constants used to specify supported string encodings in various CFString functions.

## Declaration

```swift
typealias CFStringEncoding = UInt32
```

## Discussion

Discussion This type is used to define the constants for the built-in encodings (see CFStringBuiltInEncodings for a list) and for platform-dependent encodings (see External String Encodings). If CFString does not recognize or support the string encoding of a particular string, CFString functions will identify the string’s encoding as kCFStringEncodingInvalidId.

## See Also

### Data Types

- [CFStringEncodings](corefoundation/cfstringencodings.md)
- [CFStringCompareFlags](corefoundation/cfstringcompareflags.md)
- [CFStringInlineBuffer](corefoundation/cfstringinlinebuffer.md)
