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



TextToUnicodeInfo

A Unicode converter object is a private object containing mapping and state information. Many of the Unicode Converter functions that perform conversions require a Unicode converter object containing information used for the conversion process. There are three types of Unicode converter objects, all serving the same purpose but used for different types of conversions. You use the TextToUnicodeInfo type, described here, for converting from non-Unicode text to Unicode text.

Because your application cannot directly create or modify the contents of the private Unicode converter object, the Unicode Converter provides functions to create and dispose of it. To create a Unicode converter object for converting from non-Unicode text to Unicode text, your application must first call either the function CreateTextToUnicodeInfo or the function CreateTextToUnicodeInfoByEncoding to provide the mapping information required for the conversion. You can then pass this object to the function ConvertFromTextToUnicode or ConvertFromPStringToUnicode to identify the information to be used in performing the actual conversion. After you have finished using the object, you should release the memory allocated for it by calling the function DisposeTextToUnicodeInfo. The TextToUnicodeInfo data type defines the Unicode converter object.

typedef struct OpaqueTextToUnicodeInfo *TextToUnicodeInfo;

Another function, the function TruncateForTextToUnicode, also requires a Unicode converter object as a parameter. This function does not modify the contents of the private structure to which the Unicode converter object refers, so it uses the constant Unicode converter object defined by the ConstTextToUnicodeInfo data type.

typedef const TextToUnicodeInfo ConstTextToUnicodeInfo;
SEE ALSO

The Unicode converter object of type UnicodeToTextInfo that you use for converting from Unicode text to non-Unicode text.

The Unicode converter object of type UnicodeToTextRunInfo that you use to convert from Unicode text to runs of text expressed in various encodings.


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

Up Previous Next