Carbon


TECGetSubTextEncodings

Header: TextEncodingConverter.h Carbon status: Supported

Returns the text encoding specifications for the subencodings the encoding scheme supports.

OSStatus TECGetSubTextEncodings (
    TextEncoding inputEncoding, 
    TextEncoding subEncodings[], 
    ItemCount maxSubEncodings, 
    ItemCount *actualSubEncodings
);
Parameter descriptions
inputEncoding

A text encoding specification.

subEncodings

On return, the array contains the specifications for the subencodings of the inputEncoding parameter. You should use the function TECCountSubTextEncodings function to determine what size an array to allocate.

maxSubEncodings

The number of text encoding specifications the subEncodings array can contain.

actualSubEncodings

On return, a pointer to number of subencodings in the subEncodings array.

function result

A result code.

DISCUSSION

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 the TECGetSubTextEncodings function to get the list of output encodings. See the TECCreateOneToManyConverter and TECGetDestinationTextEncodings functions for information about multiple output encoding run conversions.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)