Legacy Document
Important:
The information in this document is obsolete and should not be used for new development.
Text Encoding Variant
A text encoding variant specifies one among possibly several minor variants of a particular base encoding or group of base encodings. Text encoding variants are often used to support special cases such as the following:
-
Differences among fonts that are all intended to support the same encoding. For example, different fonts associated with the MacJapanese and MacArabic encodings support slightly different encoding variants. These fonts would typically coexist on the same system without the user being aware of any differences.
-
Artificial variants created by excluding some of the characters in an encoding. For example, the MacJapanese encoding includes separately-encoded vertical forms for some characters. In some contexts (such as with QuickDraw GX), it may be desirable to exclude these.
-
Different mappings of a particular character or group of characters for different usages.
-
Minor changes in an encoding for newer system versions (such as changes made to support the EURO SIGN character). Apple assigns a different non-zero variant for each version of the encoding; the default variant can be a "meta-variant" that resolves to the correct variant depending on the system version.
For a given text encoding base or small set of related text encoding base values, there may be an enumeration of TextEncodingVariant values, which always begins with 0, the default variant.
Languages that are dissimilar but use similar character sets are generally not designated as variants of the same base encoding (for example, MacIcelandic and MacTurkish both use a slight modification of the MacRoman character set, but they are considered separate base encodings).
A text encoding variant is defined by the TextEncodingVariant data type.
typedef UInt32 TextEncodingVariant;
When you create a new text encoding, you can specify an explicit variant of a base encoding or you can specify the default variant of that base.
The function GetTextEncodingVariant returns the text encoding variant of a text encoding specification.
The following enumeration defines constants for the default variant of any base text encoding and for variants of the Mac OS Japanese, Mac OS Arabic, Mac OS Farsi, Mac OS Hebrew, and Unicode base encodings.
enum {
/* Default TextEncodingVariant, for any TextEncodingBase */
kTextEncodingDefaultVariant = 0 ,
/* Variants of kTextEncodingMacRoman */
kMacRomanDefaultVariant = 0, /* meta value, maps to 1 or 2 */
kMacRomanCurrencySignVariant = 1, /* for Mac OS version < 8.5 */
kMacRomanEuroSignVariant = 2, /* for Mac OS version >= 8.5 */
/* Variants of kTextEncodingMacJapanese */
kMacJapaneseStandardVariant = 0,
kMacJapaneseStdNoVerticalsVariant = 1,
kMacJapaneseBasicVariant = 2,
kMacJapanesePostScriptScrnVariant = 3,
kMacJapanesePostScriptPrintVariant = 4,
kMacJapaneseVertAtKuPlusTenVariant = 5,
/* Variants of kTextEncodingMacArabic */
kMacArabicStandardVariant = 0, /* Cairo font & WorldScript tables */
kMacArabicTrueTypeVariant = 1, /* Baghdad, Geeza, Kufi, Nadeem fonts */
kMacArabicThuluthVariant = 2, /* Thuluth font */
kMacArabicAlBayanVariant = 3, /* Al Bayan font */
/* Variants of kTextEncodingMacFarsi */
kMacFarsiStandardVariant = 0, /* Tehran font & WorldScript tables */
kMacFarsiTrueTypeVariant = 1, /* TrueType fonts */
/* Variants of kTextEncodingMacHebrew */
kMacHebrewStandardVariant = 0,
kMacHebrewFigureSpaceVariant = 1,
/* Variants of kTextEncodingMacCyrillic */
kMacCyrillicDefaultVariant = 0, /* meta value, maps to 1, 2, or 3 */
kMacCyrillicCurrSignStdVariant = 1, /* for Russian & Bulg Mac OS < 9.0 */
kMacCyrillicCurrSignUkrVariant = 2, /* for Ukraine Mac OS < 9.0 & CyrLK */
kMacCyrillicEuroSignVariant = 3, /* for Mac OS >= 9.0 */
/* Variants of kTextEncodingMacIcelandic */
kMacIcelandicStdDefaultVariant = 0, /* meta value, maps to 2 or 4 */
kMacIcelandicTTDefaultVariant = 1, /* meta value, maps to 3 or 5 */
/* The following are for Mac OS version < 8.5 */
kMacIcelandicStdCurrSignVariant = 2, /* 0xBB/0xBC are ord. indicators */
kMacIcelandicTTCurrSignVariant = 3, /* 0xBB/0xBC are fi/fl ligatures */
/* The following are for Mac OS version >= 8.5 */
kMacIcelandicStdEuroSignVariant = 4, /* 0xBB/0xBC are ord. indicators */
kMacIcelandicTTEuroSignVariant = 5, /* 0xBB/0xBC are fi/fl ligatures */
/* Variants of kTextEncodingMacCroatian */
kMacCroatianDefaultVariant = 0, /* meta value, maps to 1 or 2 */
kMacCroatianCurrencySignVariant = 1, /* Mac OS version < 8.5 */
kMacCroatianEuroSignVariant = 2, /* Mac OS version >= 8.5 */
/* Variants of kTextEncodingMacRomanian */
kMacRomanianDefaultVariant = 0, /* meta value, maps to 1 or 2 */
kMacRomanianCurrencySignVariant = 1, /* Mac OS version < 8.5 */
kMacRomanianEuroSignVariant = 2, /* Mac OS version >= 8.5 */
/* Variants of kTextEncodingMacVT100 */
kMacVT100DefaultVariant = 0, /* meta value, maps to 1 or 2 */
kMacVT100CurrencySignVariant = 1, /* Mac OS version < 8.5 */
kMacVT100EuroSignVariant = 2, /* Mac OS version >= 8.5 */
/* Variants of Unicode & ISO 10646 encodings */
kUnicodeNoSubset = 0,
kUnicodeCanonicalDecompVariant = 2
};
Constant descriptions
-
kTextEncodingDefaultVariant
-
The standard default variant for any base encoding.
Mac OS Roman variants
-
kMacRomanDefaultVariant
-
A meta-variant which resolves to one of the following two variants depending on system version.
-
kMacRomanCurrencySignVariant
-
The variant of Mac OS Roman used before Mac OS 8.5; 0xDB is CURRENCY SIGN.
-
kMacRomanEuroSignVariant
-
The standard variant of Mac OS Roman for Mac OS 8.5 and later; 0xDB is EURO SIGN.
Mac OS Japanese variants
-
kMacJapaneseStandardVariant
-
The standard Japanese variant. Shift-JIS with JIS Roman modifications, extra 1-byte characters, 2-byte Apple extensions, and some vertical presentation forms in the range 0xEB40--0xEDFE ("ku plus 84").
-
kMacJapaneseStdNoVerticalsVariant
-
An artificial variant for callers who don't want to use separately encoded vertical forms (for example, developers using QuickDraw GX).
-
kMacJapaneseBasicVariant
-
An artificial variant without Apple 2-byte extensions.
-
kMacJapanesePostScriptScrnVariant
-
The Japanese variant for the screen bitmap version of the Sai Mincho and Chu Gothic fonts.
-
kMacJapanesePostScriptPrintVariant
-
The Japanese variant for PostScript printing versions of the Sai Mincho and Chu Gothic PostScript fonts. This version includes 2-byte half-width characters in addition to 1-byte half-width characters.
-
kMacJapaneseVertAtKuPlusTenVariant
-
The Japanese variant for the Hon Mincho and Maru Gothic fonts used in the Japanese localized version of System 7.1. It does not include the standard Apple extensions, and encodes vertical forms at a different location.
Mac OS Arabic variants
-
kMacArabicStandardVariant
-
This variant is supported by the Cairo font (the system font for Arabic) and is the encoding supported by the text processing utilities.
-
kMacArabicTrueTypeVariant
-
This variant is used for most of the Arabic TrueType fonts: Baghdad, Geeza, Kufi, Nadeem.
-
kMacArabicThuluthVariant
-
This variant is used for the Arabic PostScript-only fonts: Thuluth and Thuluth bold.
-
kMacArabicAlBayanVariant
-
This variant is used for the Arabic TrueType font Al Bayan.
Mac OS Farsi variants
-
kMacFarsiStandardVariant
-
This variant is supported by the Tehran font (the system font for Farsi) and is the encoding supported by the text processing utilities.
-
kMacFarsiTrueTypeVariant
-
This variant is used for most of the Farsi TrueType fonts: Ashfahan, Amir, Kamran, Mashad, NadeemFarsi.
Mac OS Hebrew variants
-
kMacHebrewStandardVariant
-
The standard Hebrew variant.
-
kMacHebrewFigureSpaceVariant
-
The Hebrew variant in which 0xD4 represents figure space, not left single quotation mark as in the standard variant.
Mac OS Cyrillic variants
-
kMacCyrillicDefaultVariant
-
A meta-variant which resolves to one of the following three variants depending on system version and system localization.
-
kMacCyrillicCurrSignStdVariant
-
The Cyrillic currency-sign variant of Mac OS Cyrillic used for Russian and Bulgarian localized systems before Mac OS 9.0; 0xA2 and 0xB6 are CENT SIGN and PARTIAL DIFFERENTIAL, 0xFF is CURRENCY SIGN.
-
kMacCyrillicCurrSignUkrVariant
-
The Ukrainian currency-sign variant of Mac OS Cyrillic used for Ukrainian localized systems and the Cyrillic Language Kit before Mac OS 9.0; 0xA2 and 0xB6 are capital and small GHE WITH UPTURN, 0xFF is CURRENCY SIGN.
-
kMacCyrillicEuroSignVariant
-
The standard Euro-sign variant of MacCyrillic used for all Slavic Cyrillic localized systems and the Cyrillic language kit for Mac OS 9.0 and later; 0xA2 and 0xB6 are capital and small GHE WITH UPTURN, 0xFF is EURO SIGN.
Mac OS Icelandic variants
-
kMacIcelandicStdDefaultVariant
-
A meta-variant for the standard Icelandic font variant used for the bitmap versions of Chicago, Geneva, Monaco, and New York in the Icelandic system; this is also the variant supported by the text processing utilities. In this font variant, 0xBB and 0xBC are feminine and masculine ordinal indicators. This meta-variant resolves to either kMacIcelandicStdCurrSignVariant or kMacIcelandicStdEuroSignVariant depending on the system version.
-
kMacIcelandicTTDefaultVariant
-
A meta-variant for the "TrueType" Icelandic font variant used for the TrueType versions of Chicago, Geneva, Monaco, New York and for the TrueType and bitmap versions of Courier, Helvetica, Palatino, and Times in the Icelandic system. In this font variant, 0xBB and 0xBC are fi and fl ligatures. This meta-variant resolves to either kMacIcelandicTTCurrSignVariant or kMacIcelandicTTEuroSignVariant depending on the system version.
-
kMacIcelandicStdCurrSignVariant
-
The standard font variant of Mac OS Icelandic used before Mac OS 8.5; 0xDB is CURRENCY SIGN.
-
kMacIcelandicTTCurrSignVariant
-
The standard font variant of Mac OS Icelandic for Mac OS 8.5 and later; 0xDB is EURO SIGN.
-
kMacIcelandicStdEuroSignVariant
-
The TrueType font variant of Mac OS Icelandic used before Mac OS 8.5; 0xDB is CURRENCY SIGN.
-
kMacIcelandicTTEuroSignVariant
-
The TrueType font variant of Mac OS Icelandic for Mac OS 8.5 and later; 0xDB is EURO SIGN.
Mac OS Croatian variants
-
kMacCroatianDefaultVariant
-
A meta-variant which resolves to one of the following two variants depending on system version.
-
kMacCroatianCurrencySignVariant
-
The variant of Mac OS Croatian used before Mac OS 8.5; 0xDB is CURRENCY SIGN.
-
kMacCroatianEuroSignVariant
-
The standard variant of Mac OS Croatian for Mac OS 8.5 and later; 0xDB is EURO SIGN.
Mac OS Romanian variants
-
kMacRomanianDefaultVariant
-
A meta-variant which resolves to one of the following two variants depending on system version.
-
kMacRomanianCurrencySignVariant
-
The variant of Mac OS Romanian used before Mac OS 8.5; 0xDB is CURRENCY SIGN.
-
kMacRomanianEuroSignVariant
-
The standard variant of Mac OS Romanian for Mac OS 8.5 and later; 0xDB is EURO SIGN.
Mac OS VT100 variants
-
kMacVT100DefaultVariant
-
A meta-variant which resolves to one of the following two variants depending on system version.
-
kMacVT100CurrencySignVariant
-
The variant of Mac OS VT100 used before Mac OS 8.5; 0xDB is CURRENCY SIGN.
-
kMacVT100EuroSignVariant
-
The standard variant of Mac OS VT100 for Mac OS 8.5 and later; 0xDB is EURO SIGN.
Unicode variants
-
kUnicodeNoSubset
-
The standard Unicode encoded character set in which the full set of Unicode characters are supported.
-
kUnicodeCanonicalDecompVariant
-
A variant of Unicode using maximal decomposition with characters in canonical order. This variant does not include most characters which have a canonical decomposition, such as single characters for accented Latin letters or single characters for Korean Hangul syllables (however, this restriction is relaxed for symbol characters in the range U+2000 to U+2FFF). In TEC Manager 1.3, the Unicode Converter supports this variant for converting to and from Mac OS encodings.
© 1999 Apple Computer, Inc. (Last Updated 13 Dec 99)