Contents

TECCreateConverter

Determines a conversion path for a source and destinationencoding, then creates a text encoding converter object and returnsa pointer to it.

Declaration

OSStatus TECCreateConverter(TECObjectRef *newEncodingConverter, TextEncoding inputEncoding, TextEncoding outputEncoding);

Parameters

  • newEncodingConverter:

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

  • inputEncoding:

    The text encoding specification for the source text encoding.

  • outputEncoding:

    The text encoding specification for the destination text encoding.

Return Value

A resultcode. See Result Codes.

Discussion

You use this converter object reference with conversion functionssuch as TECConvertText toconvert text. This converter object describes the source, destination,and intermediate encodings; state information; and references torequired plug-ins.

If the function does not find a direct conversion path, itcreates an indirect conversion path. You can use the function TECCreateConverterFromPath to specify an explicit conversion path.

You must use the TECDisposeConverter function to remove a converter object.

See Also

Creating and Deleting Converter Objects