Transcoding complex data

The TTranscoder conversion functions manipulate only a single continuous run of unstyled text (you can transcode styled text, but the conversion functions ignore the style information). For some character sets, this might mean that important information gets lost. For example, in the Macintosh character encoding system, information about the script is contained in the font. To correctly convert this data, you might:

  1. Create a loop that extracts the needed information for each run.
  2. Within the loop, use that information to select the correct transcoder.
  3. Call the TTranscoder::AppendToText member function for the correct transcoder for each run.
TIP Be careful when converting from Unicode. Because Unicode allows scripts to be freely mixed within a text string with no additional style information, you might need to identify the scripts within the Unicode text and call the correct transcoder for each script. You can identify character runs with a common script using the TUnicode::GetScript member function.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker