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



TECClearConverterContextInfo

Resets a converter object to its initial state so it can be reused.

pascal OSStatus TECClearConverterContextInfo (
                     TECObjectRef encodingConverter);
encodingConverter
The reference to the text encoding converter object whose context is to be cleared. This can be a reference returned by the function TECCreateConverter, TECCreateOneToManyConverter, or TECCreateConverterFromPath.

function result
A result code. See Text Encoding Conversion Manager Result Codes for a list of possible values.

DISCUSSION

Creating a converter object and obtaining a reference to it entails some overhead and expense. It is more economical to reuse an existing converter object than to create a new one containing the same conversion information. You use the TECClearConverterContextInfo function to clear a converter object of any state and context information it contains and return it to its initial state. This does not, however, affect the source and destination encoding for which this converter object is intended to be used. If this function is unable to clear the context, it returns a result code passed through from one of the conversion plug-ins.

If you are converting multiple segments of a text string, you should not clear the converter object until you have completely converted all the text segments.


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

Up Previous Next