---
title: ChangeUnicodeToTextInfo
framework: Core Services
role: symbol
role_heading: Function
platforms: [macOS 10.0+]
path: coreservices/1433509-changeunicodetotextinfo
---

# ChangeUnicodeToTextInfo

Changes the mapping information contained in the specifiedUnicode converter object used to convert Unicode text to a non-Unicodeencoding.

## Declaration

```occ
OSStatus ChangeUnicodeToTextInfo(UnicodeToTextInfo ioUnicodeToTextInfo, ConstUnicodeMappingPtr iUnicodeMapping);
```

## Parameters

- `ioUnicodeToTextInfo`: The Unicode converter object of type doc://com.apple.documentation/documentation/coreservices/unicodetotextinfo to be modified. You use the function doc://com.apple.documentation/documentation/coreservices/1433522-createunicodetotextinfo or doc://com.apple.documentation/documentation/coreservices/1433550-createunicodetotextinfobyencodin to obtain a Unicode converter object of this type.
- `iUnicodeMapping`: The structure of type doc://com.apple.documentation/documentation/coreservices/unicodemapping to be used. This is the new mapping that replaces the existing mapping in the Unicode converter object.

## Return Value

Return Value A resultcode. See Result Codes.

## Discussion

Discussion The function replaces the mapping table information that currentlyexists in the specified Unicode converter object with the informationcontained in the new Unicode mapping structure you provide.  ChangeUnicodeToTextInfo resetsthe Unicode converter object’s fields as necessary. However, itdoes not initialize or reset the conversion state maintained bythe Unicode converter object.  This function is especially useful for converting a stringfrom Unicode if the Unicode string contains characters that requiremultiple destination encodings and you know the next destinationencoding.  For example, you can change the other (destination) encodingof the Unicode mapping structure pointed to by the iUnicodeMapping parameterbefore you call the function  ConvertFromUnicodeToText to convert the next character or sequence of characters that requirea different destination encoding.  If an error is returned, the Unicode converter object is invalid.

## See Also

### Converting From Unicode

- [ConvertFromUnicodeToText](coreservices/1433542-convertfromunicodetotext.md)
- [CreateUnicodeToTextInfo](coreservices/1433522-createunicodetotextinfo.md)
- [CreateUnicodeToTextInfoByEncoding](coreservices/1433550-createunicodetotextinfobyencodin.md)
- [DisposeUnicodeToTextInfo](coreservices/1433564-disposeunicodetotextinfo.md)
- [ResetUnicodeToTextInfo](coreservices/1433647-resetunicodetotextinfo.md)
