CreateTextToUnicodeInfo
Creates and returns a Unicode converter object containinginformation required for converting strings from a non-Unicode encodingto Unicode.
Declaration
OSStatus CreateTextToUnicodeInfo(ConstUnicodeMappingPtr iUnicodeMapping, TextToUnicodeInfo *oTextToUnicodeInfo);Parameters
- iUnicodeMapping:
A pointer to a structure of type
UnicodeMapping. Your application provides this structure to identify the mapping to use for the conversion. You must supply a value of typeTextEncodingin theunicodeEncodingfield of this structure. ATextEncodingis a triple composed of an encoding base, an encoding variant, and a format. You can obtain a Unicodemapping value by calling the functionCreateTextEncoding. - oTextToUnicodeInfo:
On return, the Unicode converter object holds mapping table information you supplied as the
UnicodeMappingparameter and state information related to the conversion. This information is required for conversion of a text stream in a non-Unicode encoding to Unicode.
Return Value
A resultcode. See Result Codes.
Discussion
You pass a Unicode converter object returned from the functionCreateTextToUnicodeInfo to the function ConvertFromTextToUnicode or ConvertFromPStringToUnicode to identify the information to be used for the conversion. Thesetwo functions modify the contents of the object.
You pass a Unicode converter object returned from CreateTextToUnicodeInfo tothe function TruncateForTextToUnicode to identify the information to be used to truncate the string. Thisfunction does not modify the contents of the Unicode converter object.
If an error is returned, the Unicode converter object is invalid.