Ticket #3885 (new defect)

SVN Diffs for #3885

 

Opened 4 years ago

Last modified 4 months ago

getTailoredSet does not work properly

Reported by: mark.davis(at)us.ibm.com Assigned to: mark
Priority: assess Milestone: UNSCH
Component: collation Version:
Keywords: collation Cc:
Load: Xref: 4041
Java Version: Operating System: all
Project (C/J): ICU4C,ICU4J and ICU4JNI Weeks: 0.8
Review:

Description (Last modified by srl)

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?

Attachments

Change History

12/31/69 17:29:02 changed by notes2

summary+: getTailoredSet() The first part is superceeded by a new bug - 4041. Bug address the second problem

12/31/69 17:29:03 changed by auditor

  • 07/07/04 14:35:49 dougfelt changed notes2
  • 07/07/04 14:35:49 dougfelt moved from incoming to collation
  • 07/12/04 01:36:59 weiv changed notes2
  • 07/12/04 01:42:21 weiv changed notes2
  • 07/12/04 19:58:08 schererm changed notes2
  • Wed Sep 28 10:45:08 2005 weiv changed notes2: assign: "vladimir" to "weiv", target: "3.2" to "3.6", comments: "!discuss!
  • " to "summary+: getTailoredSet()
  • !discuss!
  • ",
  • Wed Oct 5 11:02:53 2005 weiv changed notes2: summmary: "collation problems using keywords with getFunctionalEquivalent() and" to "getTailoredSet does not work properly", xref: "" to "4041", comments: "summary+: getTailoredSet()
  • !discuss!
  • " to "summary+: getTailoredSet()
  • The first part is superceeded by a new bug - 4041.
  • Bug address the second problem
  • ",
  • Fri Oct 13 18:09:37 2006 andy changed notes2: target: "3.6" to "UNSCH",

07/07/08 12:38:56 changed by srl

  • load changed.
  • java changed.
  • description changed.
  • priority changed from major to assess.
  • owner changed from weiv to srl.
  • revw changed.

07/21/08 09:29:47 changed by hchapman

  • owner changed from srl to mark.

Add/Change #3885 (getTailoredSet does not work properly)




Anti spam check: