From: Doug F. <df...@ya...> - 2002-08-29 19:23:21
|
Albert: At the risk of further confusion, let me add my voice to the mix. I'm the least conversant with collation, so perhaps I'm in the best position to understand your problem :-) Just to reiterate: 1) Instantiating a Collator using a locale _is_ the most general way to perform locale-independent collation. That creates the most generally appropriate collator for that locale. 2) You need to know, for your application, whether primary, secondary, tertiary, or other differences need to be ignored. As a general case this setting will be the same, in a particular application, for all locales, but you may run into exceptions. 3) Sometimes multiple conventions are used for a given language (and country). Such is the case in German, where phonebook sort order is different from 'standard' sort order. The variant mechanism (the third segment of the locale name, after language and region/country) is a way to select between predefined variants. Where we are aware of multiple variants in common use we make them available, but we do not and can not know which variant a particular application needs to use. For example, we don't know whether you're sorting names for a phonebook or not. We assume the standard order is going to be appropriate most of the time (that's why 'de' has the standard order, and 'de__PHONEBOOK' is the variant) but it may not be in your case. Variants are in the general case particular to a language/country-- there is no global 'PHONEBOOK' variant for all locales-- though sometimes there are variants common to several locales (PRE_EURO). 4) Sometimes applications have special needs, so there is the tailoring mechanism in collation for those applications that know, in great detail, exactly what they want to use. There's no way to fully shield you from internationalization issues (unless you're lucky enough that the default case in all locales exactly matches what you want to do). Discovering where the default behavior is inappropriate for your case is part and parcel of the process of refining the specs for your application. It is unfortunate that the example in the docs does not match the general case. We are sometimes guilty of forgetting that many of our clients are not familiar with the nuances of internationalization, or our implementation. We should make sure the examples in our docs work 'out of the box' so that users aren't confused when they don't work. It appears that happened in this case. Doug __________________________________________________ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com |