---
title: CreateUnicodeToTextInfo
framework: Core Services
role: symbol
role_heading: Function
platforms: [macOS 10.0+]
path: coreservices/1433522-createunicodetotextinfo
---

# CreateUnicodeToTextInfo

Creates and returns a Unicode converter object containinginformation required for converting strings from Unicode to a non-Unicodeencoding.

## Declaration

```occ
OSStatus CreateUnicodeToTextInfo(ConstUnicodeMappingPtr iUnicodeMapping, UnicodeToTextInfo *oUnicodeToTextInfo);
```

## Parameters

- `iUnicodeMapping`: A pointer to a structure of type doc://com.apple.documentation/documentation/coreservices/unicodemapping. Your application provides this structure to identify the mapping to be used for the conversion. The unicodeEncoding field of this structure can specify a Unicode format of kUnicode16BitFormat or kUnicodeUTF8Format. Note that the versions of the Unicode Converter prior to 1.2.1 do not support kUnicodeUTF8Format.
- `oUnicodeToTextInfo`: On return, a pointer to a Unicode converter object that holds the mapping table information you supply as the iUnicodeMapping parameter and the state information related to the conversion. The information contained in the Unicode converter object is required for the conversion of a Unicode string to a non-Unicode encoding.

## Return Value

Return Value A resultcode. See Result Codes.

## Discussion

Discussion You pass the Unicode converter object returned from CreateUnicodeToTextInfo tothe function  ConvertFromUnicodeToText or  ConvertFromUnicodeToPString to identify the information to be used for the conversion. Thesetwo functions modify the contents of the Unicode converter object.  If an error is returned, the Unicode converter object is invalid.

## See Also

### Converting From Unicode

- [ChangeUnicodeToTextInfo](coreservices/1433509-changeunicodetotextinfo.md)
- [ConvertFromUnicodeToText](coreservices/1433542-convertfromunicodetotext.md)
- [CreateUnicodeToTextInfoByEncoding](coreservices/1433550-createunicodetotextinfobyencodin.md)
- [DisposeUnicodeToTextInfo](coreservices/1433564-disposeunicodetotextinfo.md)
- [ResetUnicodeToTextInfo](coreservices/1433647-resetunicodetotextinfo.md)
