Carbon


TECCreateConverterFromPath

Header: TextEncodingConverter.h Carbon status: Supported

Creates a converter object for a specific conversion path—from a source encoding through intermediate encodings to a destination encoding—and returns a pointer to it.

OSStatus TECCreateConverterFromPath (
    TECObjectRef *newEncodingConverter, 
    TextEncoding inPath[], 
    ItemCount inEncodings
);
Parameter descriptions
newEncodingConverter

A pointer to a converter object reference. On return, the reference points to a newly created text converter object.

inPath

An ordered array of text encoding specifications, beginning with the source encoding specification and ending with the destination encoding specification. Each adjacent pair of text encodings must represent a conversion that is supported by the Text Encoding Converter.

inEncodings

The number of text encoding specifications in the inPath array.

function result

A result code.

DISCUSSION

This function is faster than the function TECCreateConverter since it does not need to search for a conversion path. You can use the TECGetDestinationTextEncodings function to determine each step in the sequence from the source to the destination encoding.

To remove a converter object, you must call the function TECDisposeConverter.

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)