Contents

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

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.

See Also

Converting From Unicode