API addition proposal: Collate Digits As Numbers (CODAN)

Vladimir Weinstein <[email protected]>
Newsgroups gmane.comp.lib.icu.general
Message-ID <[email protected]>
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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.