TECGetSubTextEncodings
Returns the text encoding specifications for the subencodings the encoding scheme supports.
pascal OSStatus TECGetSubTextEncodings ( TextEncoding inputEncoding, TextEncoding subEncodings[], ItemCount maxSubEncodings, ItemCount *actualSubEncodings);
inputEncoding- The text encoding specification containing the subencodings.
subEncodings[]- An array composed of text encoding specifications. On return, the
TECGetSubTextEncodingsfunction fills the array with the specifications for the text encodings, which are subencodings of the encoding specified in theinputEncodingparameter, given the current configuration of the Text Encoding Converter. To determine how large an array to allocate, use the functionTECCountSubTextEncodings(page 68).maxSubEncodings- The number of text encoding specifications the
subEncodingsarray can contain.actualSubEncodings- A pointer to a value of type
ItemCount. On output, this value indicates the number of subencodings the function returned in thesubEncodingsarray.- function result
- A result code. See "Text Encoding Conversion Manager Result Codes" (page 42) for a list of possible values. If other than
noErr, then one of the text conversion plug-ins encountered an error when polled by the Text Encoding Converter.DISCUSSION
TheTECGetSubTextEncodingsfunction returns the text encoding specifications in the array you pass to the function as thesubEncodingsparameter. Subencodings are text encodings that are embedded as part of a larger text encoding specification. For example, EUC-JP contains JIS Roman or ASCII, JIS X0208, JIS X0212, and half-width Katakana from JIS X0201. Not every encoding that can be broken into multiple encodings necessarily supports this routine. It's up to the plug-in developer to decide which encodings might be useful to break up. Subencodings are not the same as text encoding variants.If an encoding can be converted to multiple runs of encodings (as indicated by a destination base encoding of
kTextEncodingMultiRun), you can call theTECGetSubTextEncodings(page 69) function to get the list of output encodings. See theTECCreateOneToManyConverter(page 99) andTECGetDestinationTextEncodings(page 74) functions for information about multiple output encoding run conversions.