CreateUnicodeToTextInfo
Creates and returns a Unicode converter object containinginformation required for converting strings from Unicode to a non-Unicodeencoding.
Declaration
OSStatus CreateUnicodeToTextInfo(ConstUnicodeMappingPtr iUnicodeMapping, UnicodeToTextInfo *oUnicodeToTextInfo);Parameters
- iUnicodeMapping:
A pointer to a structure of type Unicodemapping. Your application provides this structure to identify the mapping to be used for the conversion. The
unicodeEncodingfield of this structure can specify a Unicode format ofkUnicode16BitFormatorkUnicodeUTF8Format. Note that the versions of the Unicode Converter prior to 1.2.1 do not supportkUnicodeUTF8Format. - oUnicodeToTextInfo:
On return, a pointer to a Unicode converter object that holds the mapping table information you supply as the
iUnicodeMappingparameter and the state information related to the conversion. The information contained in the Unicode converter object is required for the conversion of a Unicode string to a non-Unicode encoding.
Return Value
A resultcode. See Result Codes.
Discussion
You pass the Unicode converter object returned from CreateUnicodeToTextInfo tothe function ConvertFromUnicodeToText or ConvertFromUnicodeToPString to identify the information to be used for the conversion. Thesetwo functions modify the contents of the Unicode converter object.
If an error is returned, the Unicode converter object is invalid.