---
title: TECCreateConverter
framework: Core Services
role: symbol
role_heading: Function
platforms: [macOS 10.0+]
path: coreservices/1571815-teccreateconverter
---

# TECCreateConverter

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

## Declaration

```occ
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

Return Value A resultcode. See Result Codes.

## Discussion

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

- [TECCreateConverterFromPath](coreservices/1571829-teccreateconverterfrompath.md)
- [TECClearConverterContextInfo](coreservices/1571844-tecclearconvertercontextinfo.md)
- [TECDisposeConverter](coreservices/1571839-tecdisposeconverter.md)
