CreateTextEncoding
Creates and returns a text encoding specification.
Declaration
TextEncoding CreateTextEncoding(TextEncodingBase encodingBase, TextEncodingVariant encodingVariant, TextEncodingFormat encodingFormat);Parameters
- encodingBase:
A base text encoding.
- encodingVariant:
A variant of the base text encoding. To specify the default variant for the base encoding given in the
encodingBaseparameter, you can use thekTextEncodingDefaultVariantconstant. - encodingFormat:
A format for the base text encoding. To specify the default format for the base encoding, you can use the
kTextEncodingDefaultFormatconstant. If you want to obtain aTextEncodingvalue that references UTF-16 or UTF-8, passkUnicode16BitFormatorkUnicodeUTF8Format.
Return Value
The text encodingspecification that the function creates from the values you passit.
Discussion
When you create a text encoding specification, the three valuesthat you specify are packed into an unsigned integer, which youcan then pass by value to the functions that use text encodings.See the data type TextEncodingRun.