Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Up Previous Next 

PATH 
Mac OS 8 and 9 Developer Documentation > Text Encoding Conversion Manager
Programming With the Text Encoding Conversion Manager



ChangeUnicodeToTextInfo

Changes the mapping information contained in the specified Unicode converter object used to convert Unicode text to another encoding.

pascal OSStatus ChangeUnicodeToTextInfo (
                     UnicodeToTextInfo ioUnicodeToTextInfo,
                     ConstUnicodeMappingPtr iUnicodeMapping);
ioUnicodeToTextInfo
The Unicode converter object of type UnicodeToTextInfo to be modified. You use the function CreateUnicodeToTextInfo or CreateUnicodeToTextInfoByEncoding 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.

function result
A result code. See Text Encoding Conversion Manager Result Codes in the chapter Basic Text Types Reference

DISCUSSION

The ChangeUnicodeToTextInfo function allows you to provide new mapping information for converting text from Unicode to another encoding. The function replaces the mapping table information that currently exists in the specified Unicode converter object with the information contained in the new Unicode mapping structure you provide.

ChangeUnicodeToTextInfo resets the Unicode converter object's fields as necessary. However, it does not initialize or reset the conversion state maintained by the Unicode converter object.

This function is especially useful for converting a string from Unicode if the Unicode string contains characters that require multiple destination encodings and you know the next destination encoding.

For example, you can change the other (destination) encoding of the Unicode mapping structure pointed to by the iUnicodeMapping parameter before you call the function ConvertFromUnicodeToText to convert the next character or sequence of characters that require a different destination encoding.

In addition to various resource errors, the function can return the following result codes:

If an error is returned, the Unicode converter object is invalid.


© 1999 Apple Computer, Inc. – (Last Updated 13 Dec 99)

Up Previous Next