![]() |
CreateTextToUnicodeInfoByEncoding |
||||
Header: | UnicodeConverter.h | Carbon status: | Supported | |
Based on the given text encoding specification, creates and returns a Unicode converter object containing information required for converting strings from the specified non-Unicode encoding to Unicode.
OSStatus CreateTextToUnicodeInfoByEncoding ( TextEncoding iEncoding, TextToUnicodeInfo *oTextToUnicodeInfo );
The text encoding specification for the source text.
The Unicode converter object of type TextToUnicodeInfo returned by the function.
A result code.
You can use this function instead of the CreateTextToUnicodeInfo function when you do not need to create a Unicode mapping structure. You simply specify the text encoding of the source text. However, this method is less efficient because the text encoding parameter must be resolved internally into a Unicode mapping.
You cannot specify a version of Unicode. The function uses a 16-bit form of Unicode as the default.
You pass a Unicode converter object returned from CreateTextToUnicodeInfoByEncoding to the function ConvertFromTextToUnicode or ConvertFromPStringToUnicode to identify the information to be used for the conversion. These two functions modify the contents of the Unicode converter object.
You pass a Unicode converter object returned from CreateTextToUnicodeInfoByEncoding to the function TruncateForTextToUnicode to identify the information to be used to truncate the string. This function does not modify the contents of the Unicode converter object.
If you are converting the text stream to Unicode as an intermediary encoding, and then from Unicode to the final destination encoding, you use the function CreateUnicodeToTextInfo to create a Unicode converter object for the second part of the process.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)