Legacy Document
Important:
The information in this document is obsolete and should not be used for new development.
Unicode Character Properties
You can obtain information about the some of the properties of a Unicode character using the function UCGetCharProperty. These properties are defined by the Unicode Consortium. You specify the property whose value you would like to obtain using the UCCharPropertyType data type.
typedef SInt32 UCCharPropertyType;
There are three public tags defined for UCCharPropertyType:
enum {
kUCCharPropTypeGenlCategory = 1,/* requests enum value */
kUCCharPropTypeCombiningClass = 2,/* requests numeric value 0..255 */
kUCCharPropTypeBidiCategory = 3/* requests enum value */
};
The value of the requested property is returned as a UCCharPropertyValue data type:
typedef UInt32 UCCharPropertyValue;
The kUCCharPropTypeGenlCategory tag requests the Unicode General Category property. The UCCharPropertyValue values that can be returned for the property are enumerated based on the categories defined by the Unicode Consortium.
enum {
/* Normative categories: */
kUCGenlCatOtherNotAssigned = 0,/* Cn Other, Not Assigned */
kUCGenlCatOtherControl = 1,/* Cc Other, Control */
kUCGenlCatOtherFormat = 2,/* Cf Other, Format */
kUCGenlCatOtherSurrogate = 3,/* Cs Other, Surrogate */
kUCGenlCatOtherPrivateUse = 4,/* Co Other, Private Use */
kUCGenlCatMarkNonSpacing = 5,/* Mn Mark, Non-Spacing */
kUCGenlCatMarkSpacingCombining = 6,/* Mc Mark, Spacing Combining */
kUCGenlCatMarkEnclosing = 7,/* Me Mark, Enclosing */
kUCGenlCatNumberDecimalDigit = 8,/* Nd Number, Decimal Digit */
kUCGenlCatNumberLetter = 9,/* Nl Number, Letter */
kUCGenlCatNumberOther = 10,/* No Number, Other */
kUCGenlCatSeparatorSpace = 11,/* Zs Separator, Space */
kUCGenlCatSeparatorLine = 12,/* Zl Separator, Line */
kUCGenlCatSeparatorParagraph = 13,/* Zp Separator, Paragraph */
/* Informative categories: */
kUCGenlCatLetterUppercase = 14,/* Lu Letter, Uppercase */
kUCGenlCatLetterLowercase = 15,/* Ll Letter, Lowercase */
kUCGenlCatLetterTitlecase = 16,/* Lt Letter, Titlecase */
kUCGenlCatLetterModifier = 17,/* Lm Letter, Modifier */
kUCGenlCatLetterOther = 18,/* Lo Letter, Other */
kUCGenlCatPunctConnector = 20,/* Pc Punctuation, Connector */
kUCGenlCatPunctDash = 21,/* Pd Punctuation, Dash */
kUCGenlCatPunctOpen = 22,/* Ps Punctuation, Open */
kUCGenlCatPunctClose = 23,/* Pe Punctuation, Close */
kUCGenlCatPunctInitialQuote = 24,/* Pi Punctuation, Initial quote */
kUCGenlCatPunctFinalQuote = 25,/* Pf Punctuation, Final quote */
kUCGenlCatPunctOther = 26,/* Po Punctuation, Other */
kUCGenlCatSymbolMath = 28,/* Sm Symbol, Math */
kUCGenlCatSymbolCurrency = 29,/* Sc Symbol, Currency */
kUCGenlCatSymbolModifier = 30,/* Sk Symbol, Modifier */
kUCGenlCatSymbolOther = 31/* So Symbol, Other */
};
The kUCCharPropTypeCombiningClass tag requests the Unicode Canonical Combining Class property. The UCCharPropertyValue values that can be returned for the property are numeric values in the range 0 through 255, as defined by the Unicode Consortium.
The kUCCharPropTypeBidiCategory tag requests the Unicode Bidirectional Category property. The UCCharPropertyValue values that can be returned for the property are enumerated based on the categories defined by the Unicode Consortium.
enum {
kUCBidiCatNotApplicable = 0, /* currently used for unassigned */
/* Strong types: */
kUCBidiCatLeftRight = 1, /* L Left-Right */
kUCBidiCatRightLeft = 2, /* R Right-Left */
/* Weak types: */
kUCBidiCatEuroNumber = 3, /* EN European Number */
kUCBidiCatEuroNumberSeparator = 4, /* ES European Number Separator */
kUCBidiCatEuroNumberTerminator = 5, /* ET European Number Terminator */
kUCBidiCatArabicNumber = 6, /* AN Arabic Number */
kUCBidiCatCommonNumberSeparator = 7, /* CS Common Number Separator */
/* Separators: */
kUCBidiCatBlockSeparator = 8, /* B Block Separator */
kUCBidiCatSegmentSeparator = 9, /* S Segment Separator */
/* Neutrals: */
kUCBidiCatWhitespace = 10, /* WS Whitespace */
kUCBidiCatOtherNeutral = 11 /* ON Other Neutrals */
};
© 1999 Apple Computer, Inc. (Last Updated 13 Dec 99)