Carbon


CreateTextToUnicodeInfo

Header: UnicodeConverter.h Carbon status: Supported

Creates and returns a Unicode converter object containing information required for converting strings from a non-Unicode encoding to Unicode.

OSStatus CreateTextToUnicodeInfo (
    ConstUnicodeMappingPtr iUnicodeMapping, 
    TextToUnicodeInfo *oTextToUnicodeInfo
);
Parameter descriptions
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 unicodeEncoding field of this structure can specify a Unicode format of kUnicode16BitFormat or kUnicodeUTF8Format. Versions of the Unicode Converter prior to 1.2.1 do not support kUnicodeUTF8Format.

oTextToUnicodeInfo

On return, the Unicode converter object holds mapping table information you supplied as the UnicodeMapping parameter and state information related to the conversion. This information is required for conversion of a text stream in a non-Unicode encoding to Unicode.

function result

A result code.

DISCUSSION

You pass a Unicode converter object returned from the function CreateTextToUnicodeInfo to the function ConvertFromTextToUnicode or ConvertFromPStringToUnicode to identify the information to be used for the conversion. These two functions modify the contents of the object.

You pass a Unicode converter object returned from CreateTextToUnicodeInfo to the function TruncateForTextToUnicode to identify the information to be used to truncate the string. This function does not modify the contents of the Unicode converter object.

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)