Type Alias

NSStringEncoding

The following constants are provided by NSString as possible string encodings.

Declaration

typedef NSUInteger NSStringEncoding;

Discussion

These values represent the various character encodings supported by the NSString classes. This is an incomplete list. Additional encodings are defined in String Programming Guide for Core Foundation (see CFStringEncodingExt.h); these encodings can be used with NSString by first passing the Core Foundation encoding to the CFStringConvertEncodingToNSStringEncoding function.

Topics

Constants

NSASCIIStringEncoding

Strict 7-bit ASCII encoding within 8-bit chars; ASCII values 0…127 only.

NSNEXTSTEPStringEncoding

8-bit ASCII encoding with NEXTSTEP extensions.

NSJapaneseEUCStringEncoding

8-bit EUC encoding for Japanese text.

NSUTF8StringEncoding

An 8-bit representation of Unicode characters, suitable for transmission or storage by ASCII-based systems.

NSISOLatin1StringEncoding

8-bit ISO Latin 1 encoding.

NSSymbolStringEncoding

8-bit Adobe Symbol encoding vector.

NSNonLossyASCIIStringEncoding

7-bit verbose ASCII to represent all Unicode characters.

NSShiftJISStringEncoding

8-bit Shift-JIS encoding for Japanese text.

NSISOLatin2StringEncoding

8-bit ISO Latin 2 encoding.

NSUnicodeStringEncoding

The canonical Unicode encoding for string objects.

NSWindowsCP1251StringEncoding

Microsoft Windows codepage 1251, encoding Cyrillic characters; equivalent to AdobeStandardCyrillic font encoding.

NSWindowsCP1252StringEncoding

Microsoft Windows codepage 1252; equivalent to WinLatin1.

NSWindowsCP1253StringEncoding

Microsoft Windows codepage 1253, encoding Greek characters.

NSWindowsCP1254StringEncoding

Microsoft Windows codepage 1254, encoding Turkish characters.

NSWindowsCP1250StringEncoding

Microsoft Windows codepage 1250; equivalent to WinLatin2.

NSISO2022JPStringEncoding

ISO 2022 Japanese encoding for email.

NSMacOSRomanStringEncoding

Classic Macintosh Roman encoding.

NSUTF16BigEndianStringEncoding

NSUTF16StringEncoding encoding with explicit endianness specified.

NSUTF16LittleEndianStringEncoding

NSUTF16StringEncoding encoding with explicit endianness specified.

NSUTF32StringEncoding

32-bit UTF encoding.

NSUTF32BigEndianStringEncoding

NSUTF32StringEncoding encoding with explicit endianness specified.

NSUTF32LittleEndianStringEncoding

NSUTF32StringEncoding encoding with explicit endianness specified.

NSProprietaryStringEncoding

Installation-specific encoding.