Legacy Document
Important:
The information in this document is obsolete and should not be used for new development.
Filter Control Flags
You can query the Unicode Converter for a list of all available mappings between any two encodings whose base, variant, and format values match those you specify as filter control flags. For example, you can check for all available mappings between Unicode 2.0 and all encodings having a specific default variant. To identify possible mappings, you set filter control flags that give the matching criteria.
You call the QueryUnicodeMappings function (page 154) to obtain a list of mappings that meet your search criteria. When you call this function, you specify a pointer to a Unicode mapping structure (page 97). A Unicode mapping structure contains fields that specify text encodings, and a text encoding specification gives base, variant, and format values. For information about text encoding specifications, see "Basic Text Types Reference".
You can obtain a count of all possible mappings that match your criteria by calling the function CountUnicodeMappings. You might want to do this to determine how many elements to allocate for the array of mapping information QueryUnicodeMappings returns.
To identify the text encoding specification subfields of the Unicode mapping structure whose values you want to use as matching criteria, you set an iFilter parameter that you pass to the QueryUnicodeMappings function or the CountUnicodeMappings function. The iFilter parameter control flag settings identify the three fields of the Unicode encoding specification and the three fields of the other text encoding specification. The QueryUnicodeMappings function returns only those mappings whose corresponding field values match the ones you specify.
The following enumerations define constants that set the filter indicators of the QueryUnicodeMappings and CountUnicodeMappings iFilter fields:
enum {
kUnicodeMatchUnicodeBaseBit = 0,
kUnicodeMatchUnicodeVariantBit = 1,
kUnicodeMatchUnicodeFormatBit = 2,
kUnicodeMatchOtherBaseBit = 3,
kUnicodeMatchOtherVariantBit = 4,
kUnicodeMatchOtherFormatBit = 5,
};
enum {
kUnicodeMatchUnicodeBaseMask = 1L << kUnicodeMatchUnicodeBaseBit,
kUnicodeMatchUnicodeVariantMask =
1L << kUnicodeMatchUnicodeVariantBit,
kUnicodeMatchUnicodeFormatMask = 1L << kUnicodeMatchUnicodeFormatBit,
kUnicodeMatchOtherBaseMask = 1L << kUnicodeMatchOtherBaseBit,
kUnicodeMatchOtherVariantMask = 1L << kUnicodeMatchOtherVariantBit,
kUnicodeMatchOtherFormatMask = 1L << kUnicodeMatchOtherFormatBit
};
Constant descriptions
-
kUnicodeMatchUnicodeBaseMask
-
If set, excludes mappings that do not match the text encoding base of the unicodeEncoding field of the structure UnicodeMapping. If not set, the function ignores the text encoding base of that field.
-
kUnicodeMatchUnicodeVariantMask
-
-
If set, excludes mappings that do not match the text encoding variant of the unicodeEncoding field of the specified Unicode mapping structure. If not set, the function ignores the text encoding variant of that field.
-
kUnicodeMatchUnicodeFormatMask
-
-
If set, excludes mappings that do not match the text encoding format of the unicodeEncoding field of the specified Unicode mapping structure. If not set, the function ignores the text encoding format of that field.
-
kUnicodeMatchOtherBaseMask
-
-
If set, excludes mappings that do not match the text encoding base of the otherEncoding field of the structure UnicodeMapping. If not set, the function ignores the text encoding base of that field.
-
kUnicodeMatchOtherVariantMask
-
-
If set, excludes mappings that do not match the text encoding variant of the otherEncoding field of the specified Unicode mapping structure. If not set, the function ignores the text encoding variant of that field.
-
kUnicodeMatchOtherFormatMask
-
If set, excludes mappings that do not match the text encoding format of the otherEncoding field of the specified Unicode mapping structure. If not set, the function ignores the text encoding format of that field.
© 1999 Apple Computer, Inc. (Last Updated 13 Dec 99)