Carbon


Converter Fixes and Features Flags

Header: TextCommon.h

enum {
    kTECKeepInfoFixBit = 0,
    kTECFallbackTextLengthFixBit = 1,
    kTECTextRunBitClearFixBit = 2,
    kTECTextToUnicodeScanFixBit = 3,
    kTECAddForceASCIIChangesBit = 4,
    kTECPreferredEncodingFixBit = 5,
    kTECAddTextRunHeuristicsBit = 6,
    kTECAddFallbackInterruptBit = 7
};

Constant descriptions

kTECKeepInfoFixBit

This is set if the Unicode Converter has a bug fix to stop ignoring certain control flags

kTECFallbackTextLengthFixBit

This is set if the Unicode Converter has a bug fix to use the source length (srcConvLen) and destination length (destConvLen) returned by a caller-supplied fall-back handler for any status it returns except kTECUnmappableElementErr. Previously it honored only these values if noErr was returned.

kTECTextRunBitClearFixBit

This is set if ConvertFromUnicodeToTextRun and ConvertFromUnicodeToScriptCodeRun function correctly if the kUnicodeTextRunBit is clear.

kTECTextToUnicodeScanFixBit

This is set if ConvertFromTextToUnicode is enhanced so mappings can depend on context and saved state. The consequences of this are (1) malformed input results in kTextMalformedInputErr; (2) ConvertFromTextToUnicode accepts the control flags kUnicodeLooseMappingsMask, kUnicodeKeepInfoMask, and kUnicodeStringUnterminatedMask; (3) elimination of redundant direction overrides when converting Mac OS Arabic and Hebrew to Unicode; and (4) improved mapping of 0x30-0x39 digits in Mac OS Arabic when loose mappings are used.

kTECAddForceASCIIChangesBit

This is set if the new control flag bits kUnicodeForceASCIIRangeBit and kUnicodeNoHalfwidthCharsBit are supported for use with the functions ConvertFromTextToUnicode, ConvertFromUnicodeToText, and so forth.

kTECPreferredEncodingFixBit

This is set to indicate that if a preferred encoding is specified for CreateUnicodeToTextRunInfo and related functions, they handle it correctly even if it does not match the system script.

kTECAddTextRunHeuristicsBit
kTECAddFallbackInterruptBit

These are bit flags to indicate new features for bug fixes in the Unicode Converter. They are used by the TECInfo data type.

These are the corresponding masks:

enum { kTECKeepInfoFixMask = 1L << kTECKeepInfoFixBit, kTECFallbackTextLengthFixMask = 1L << kTECFallbackTextLengthFixBit kTECTextRunBitClearFixMask = 1L << kTECTextRunBitClearFixBit, kTECTextToUnicodeScanFixMask = 1L << kTECTextToUnicodeScanFixBit, kTECAddForceASCIIChangesMask = 1L << kTECAddForceASCIIChangesBit, kTECPreferredEncodingFixMask = 1L << kTECPreferredEncodingFixBit};


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