Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Internationalization Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

6.1 Overview

Collation is the process of comparing strings for equality and ordering. As described in Chapter 3, you can use the compareTo() method and the global comparison operators on RWUString to perform lexical comparisons. Lexical comparisons are fast, and if two strings contain characters from the same script, and are in the same normalization form (see Chapter 5), lexical comparisons may be adequate for many purposes.

However, lexical comparisons are unlikely to match an end user's expectations regarding string equality and ordering, because each language has its own rules for determining the proper collation order for strings. For instance:

These are just a few examples of how languages can vary in ordering strings. Furthermore, collation rules in a particular locale can change over time due to government regulations or the addition of new characters or scripts to Unicode.

Therefore, the Internationalization Module includes collation classes that support locale-sensitive string comparisons. By taking into account the collation order used in a particular locale, these classes make it possible to sort strings in accordance with the conventions of that locale:

This chapter describes:



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.