ICU Demonstration - Locale Explorer (original) (raw)
ICU Home |
---|
· ICU Home |
ICU4C Demos |
· Converter Explorer |
· IDNA |
· Locale Explorer |
· Normalization Browser |
· Regular Expressions |
· String Compare |
· Transforms |
· Unicode Browser |
ICU4J Demos |
· Demo Page |
Tools |
· Data Customizer |
Related Websites
| ICU > Demonstrations > Locale Explorer > Root > English > United States Language EnglishRegion / Variant United Statescalendar (default)collation (default)currency (default) | | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | Sublocales:United States (Computer)United States under other languages: Spanish, Hawaiian | |
This example demonstrates sorting (collation) in this locale.
Source Search for: (or leave blank for no search) Overlap? | Show Collation Key Options | Original | Collated |
---|---|---|---|
Custom Rules (Click 'Fetch rules for locale' above, to edit rules) |
Instructions:
- Type in the lines of text you want to sort under Input Text.
- Select the Options you want, and hit Sort.
- The two output columns will show the original order and the sorted order, each numbered according to the original line. Any lines in the same box (with the same color) are sorted identically, according to the options you provide.
- If you want to try changing the sorting rules, hit Edit Rules. It inserts the rules for the current locale, which you can then alter and try sorting with. You will need to know the format of the rules: see Collation in the ICU User Guide for more information.
- Note: if you hit Edit Rules again, it will replace whatever you have altered!
Options:
- ICU implements the Unicode Collation Algorithm, which is a multi-level sort.
- If there are any differences in base letters, that determines the result
- Otherwise, if there are any differences in accents*, that determines the results
- Otherwise, if there are any differences in case*, that determines the results
- Otherwise, if there are any differences in punctuation*, that determines the results
- The Level option determines which of the above levels to take into account when sorting.
- With Force Case, the normal case order (a < A vs. A < a) can be changed.
- If Punctutation = Base, then punctuation is treated like base letters. If punctuation is Shifted, it is ignored except at L4.
- A Case level can be used to keep a case level even if the strength is L1 or L2.
- A Hiragana level adds a special level for JIS compatibility. It is only used if the level is L4 .. L5.
- French accents force accents to be considered backwards, for the end of the string forwards.
- With Full Normalization, all strings are compared
For more information, see the ICU userguide