Important: The information in this document is obsolete and should not be used for new development.
It is not always possible to convert text expressed in Unicode to another single encoding because no other single encoding encompasses the Unicode character encoding range. To adjust for this, you can create a Unicode mapping structure array that specifies the target encodings the Unicode text should be converted to when multiple encodings must be used.
If the kUnicodeTextRunMask flag is set, ConvertFromUnicodeToTextRun and ConvertFromUnicodeToScriptCodeRun may convert Unicode text to a string of text containing multiple text encoding runs. Each run contains text expressed in a different encoding from that of the preceding or following text segment. For each text encoding run in the string, a TextEncodingRun structure indicates the beginning offset and the text encoding for that run.
Functions that convert text from Unicode to a text run return the converted text in an array of text encoding run structures. A text encoding run structure is defined by the TextEncodingRun data type.
struct TextEncodingRun {