Carbon


ChangeUnicodeToTextInfo

Header: UnicodeConverter.h Carbon status: Supported

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

OSStatus ChangeUnicodeToTextInfo (
    UnicodeToTextInfo ioUnicodeToTextInfo, 
    ConstUnicodeMappingPtr iUnicodeMapping
);
Parameter descriptions
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.

DISCUSSION

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.

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

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)