Important: The information in this document is obsolete and should not be used for new development.
Identifies where your application can safely break a Unicode string to be converted to any encoding so that the string is broken in a way that preserves the text element integrity.
pascal OSStatus TruncateForUnicodeToText (
Your application can use this function to divide up a Unicode string properly truncating each portion before you call ConvertFromUnicodeToText or ConvertFromUnicodeToScriptCodeRun to convert the string. You can call this function repeatedly to properly truncate a text segment, each time identifying the new beginning of the string, until the last portion of the text is less than or equal to the maximum allowable length. Each time you use the function, you get a properly terminated string within the allowable length range. You use the function as many times as necessary to be able to convert the entire text segment.
Because this function does not modify the contents of the Unicode converter object, you can call this function between conversion calls.
In addition to resource errors, the functions may return any of the following result codes: paramErr, kTECGlobalsUnavailableErr, kTECTableFormatErr, kTECPartialCharErr (if truncating UTF-8), kTECIncompleteElementErr, or kTextUndefinedElementErr. If the result code is not noErr, then the value returned by the oTruncatedLen parameter is invalid.