Important: The information in this document is obsolete and should not be used for new development.
Flushes out any data that may be stored in a converter object's temporary buffers and returns the converter object to its default state.
pascal OSStatus TECFlushText(
The TECFlushText function flushes out any data that may be stored in the temporary buffers in the specified text encoding converter object. Always call TECFlushText when you finish converting a text stream. If you are converting a single stream in multiple chunks using multiple calls to TECConvertText, you need call TECFlushText only after the last call to TECConvertText for that stream. The function relies on the specified converter object for information identifying the source encoding, the destination encoding, and any intermediate encodings required for conversion.
In allocating an output buffer, a good rule of thumb is larger is better, basing your estimate on the byte requirements of the destination encoding. You should always allocate a buffer at least 32 bytes long. For the function to return successfully, the output buffer you allocate must be large enough to accommodate the flushed text. If the output buffer you allocate is too small to accommodate any flushed text, the function will fail. For example, if the destination encoding requires additional bytes in addition to the actual text (for instance, an escape sequence preceding the converted text), your buffer must be large enough to accommodate both.
Encodings such as ISO-2022 that need to shift back to a certain default state at the end of a conversion can do so when this function is called.