Re: API addition proposal: Collate Digits As Numbers (CODAN)
Suwit Srivilairith <[email protected]>
| Newsgroups | gmane.comp.lib.icu.general |
|---|---|
| Message-ID | <OF9817AC39.7E134EE7-ON47256D5E.00478F9D-47256D5E.004811EE@th.ibm.com> |
Will the ICU numeral ordering enable all digits including all NLS
digits (For example, Devanagari digits, Arabic-Indic digits, Thai digits,
etc) to sort as numbers ? or it will enable DIGIT ZERO <U0030> thru DIGIT
NINE <U0039> only.
Suwit
Vladimir
Weinstein
<[email protected] To
> icu list
Sent by: <[email protected]>
icu-admin@www-1 cc
24.southbury.us
f.ibm.com bcc
Subject
08/07/2003 API addition proposal: Collate Digits
01:08 As Numbers (CODAN)
Expiration date: 07/14/2003
This proposal seeks to add functionality to the collation service, which
would
enable digits to sort as numbers. For example, a list of strings:
file1.txt
file10.txt
file2.txt
file22.txt
file3.txt
Would sort as:
file1.txt
file2.txt
file3.txt
file10.txt
file22.txt
The implementation is done according to the design document at
http://oss.software.ibm.com/cvs/icu/~checkout~/icuhtml/design/collation/delta_issues.html
The feature can be controlled either by setting it in rules (using the rule
option 'numericOrdering' followed by 'on' or 'off') or by setting the
appropriate attribute through the ucol_setAttribute API (attribute
UCOL_NUMERIC_ORDERING which can have values UCOL_ON or UCOL_OFF).
The default value for numerical ordering is off, which is the behavior that
we
already have. When set to on, it causes digits to sort as numbers.
Regards,
v.
--
Vladimir Weinstein, IBM GCoC-Unicode/ICU San Jose, CA [email protected]
_______________________________________________
icu mailing list
[email protected]
http://oss.software.ibm.com/developerworks/oss/mailman/listinfo/icu