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



CreateUnicodeToTextInfoByEncoding

Based on the given text encoding specification for the converted text, creates and returns a Unicode converter object containing information required for converting strings from Unicode to the specified encoding.

pascal OSStatus CreateUnicodeToTextInfoByEncoding (
                     TextEncoding iEncoding,
                     TextToUnicodeInfo *oUnicodeToTextInfo);
iEncoding
The text encoding specification for the destination, or converted, text.

oUnicodeToTextInfo
The Unicode converter object of type UnicodeToTextInfo returned by the function.

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

DISCUSSION

This function offers you an easier, alternative way to create a Unicode converter than the function CreateUnicodeToTextInfo. However, this method is less efficient internally because the destination text encoding you specify must be resolved into a Unicode mapping. Using this function, you cannot specify a version of Unicode, so a default version of Unicode is used; 16-bit format is assumed.

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

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

SEE ALSO

Text Encoding Base


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

Up Previous Next