ChangeUnicodeToTextInfo
Changes the mapping information contained in the specifiedUnicode converter object used to convert Unicode text to a non-Unicodeencoding.
Declaration
OSStatus ChangeUnicodeToTextInfo(UnicodeToTextInfo ioUnicodeToTextInfo, ConstUnicodeMappingPtr iUnicodeMapping);Parameters
- ioUnicodeToTextInfo:
The Unicode converter object of type Unicodetotextinfo to be modified. You use the function 1433522 Createunicodetotextinfo or 1433550 Createunicodetotextinfobyencodin to obtain a Unicode converter object of this type.
- iUnicodeMapping:
The structure of type Unicodemapping to be used. This is the new mapping that replaces the existing mapping in the Unicode converter object.
Return Value
A resultcode. See Result Codes.
Discussion
The function replaces the mapping table information that currentlyexists in the specified Unicode converter object with the informationcontained in the new Unicode mapping structure you provide.
ChangeUnicodeToTextInfo resetsthe Unicode converter object’s fields as necessary. However, itdoes not initialize or reset the conversion state maintained bythe Unicode converter object.
This function is especially useful for converting a stringfrom Unicode if the Unicode string contains characters that requiremultiple destination encodings and you know the next destinationencoding.
For example, you can change the other (destination) encodingof the Unicode mapping structure pointed to by the iUnicodeMapping parameterbefore you call the function ConvertFromUnicodeToText to convert the next character or sequence of characters that requirea different destination encoding.
If an error is returned, the Unicode converter object is invalid.