1. I thought I would use getFunctionalEquivalent, but it doesn't have a value
argument, so I don't know how it is supposed to work. Here is all you can call:
Collator.getFunctionalEquivalent(keywords[j], locales[i], isAvailable);
Clearly, whatever it is supposed to be equivalent to will depend on the value
assigned to the keyword. I'm guessing that I actually want to compose a complete
name for the second field, so instead of locales[i] I would have to use
locales[i] + "@" + keywords[j] + "=" + values[k]
But then it is not at all clear what the first argument for
Collator.getFunctionalEquivalent is supposed to do. In any event, it didn't work
well enough for me, since lots of stuff gets identified as not functionally
equivalent when it really is (e.g. en@collation=direct, en@collation=standard,
en@collation=phonebook, etc.) So I backed off to just identifying the functional
equivalents according to which ones shared the same rules.
...
3. Getting a bit further, I ran into another problem, in public UnicodeSet
getTailoredSet() -- while the API takes a ULocale, it doesn't actually work. For
example, ar@collation=direct blows all the way out to root, and returns a
tailored set of tens of thousands of characters. While this is clearly a bug, I
don't see an easy work-around for now, except to limit myself to certain known
keywords. Any thoughts?