![]() |
TECConvertTextToMultipleEncodings |
||||
Header: | TextEncodingConverter.h | Carbon status: | Supported | |
Converts text in the source encoding to runs of text in multiple destination encodings. It uses the conversion path specified in the converter object you supply.
OSStatus TECConvertTextToMultipleEncodings ( TECObjectRef encodingConverter, ConstTextPtr inputBuffer, ByteCount inputBufferLength, ByteCount *actualInputLength, TextPtr outputBuffer, ByteCount outputBufferLength, ByteCount *actualOutputLength, TextEncodingRun outEncodingsBuffer[], ItemCount maxOutEncodingRuns, ItemCount *actualOutEncodingRuns );
The reference to the text encoding converter object to be used for the conversion. This is the reference returned by the function TECCreateOneToManyConverter.
The stream of text to be converted.
The length in bytes of the stream of text specified in the inputBuffer parameter.
On return, a pointer to a the number of source text bytes that were converted.
On return, a pointer to a buffer that holds the converted text.
The length in bytes of the outputBuffer parameter.
On return, a pointer to the number of bytes of the converted text returned in the outputBuffer parameter.
An array of text encoding runs for output. Note that the actual byte size of this buffer should be actualOutEncodingRuns * sizeof(TextEncodingRun).
The maximum number of runs that can fit in the outEncodingsBuffer array.
On return, a pointer to the number of runs in outEncodingsBuffer array.
A result code. If there is not enough memory available to convert the text when allocating internal buffers, the function returns the appropriate Memory Manager result code.
For the function to return successfully, the output buffer you allocate must be large enough to accommodate the converted text. If the output buffer is too small to accommodate any converted text, the function will fail. For best results, you should follow these guidelines when you allocate an output buffer:
The Text Encoding Converter creates internal buffers that hold intermediate results for indirect conversions
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)