[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search
 
Modify

CLDR Ticket #10097(closed spec: fixed)

Opened 9 months ago

Last modified 2 months ago

Supply a bit more information about collation of emoji

Reported by: mark Owned by: mark
Component: collation Data Locale:
Phase: spec-beta Review: markus
Weeks: Data Xpath:
Xref:

Description

We should document more clearly how ordering of emoji works, both in LDML and in UTS #51. Others should review the following account and note any corrections.

There is a root collation for "emoji" in CLDR. So use of "-u-co-emoji" in a Unicode locale identifier will access that ordering. Example:

collator = Collator.getInstance(ULocale.forLanguageTag("en-u-co-emoji"));

However, use of the emoji will supplant the language's customizations. So the above is the equivalent of:

collator = Collator.getInstance(ULocale.forLanguageTag("und-u-co-emoji"));

The same structure will not work for a language that does require customization, like Danish. That is, the following will fail.

collator = Collator.getInstance(ULocale.forLanguageTag("da-u-co-emoji"));

For that, a slightly more cumbersome method needs to be employed, which is to take the rules for Danish, and explicitly add the rules for emoji.

RuleBasedCollator collator = new RuleBasedCollator(

((RuleBasedCollator) Collator.getInstance(ULocale.forLanguageTag("da"))).getRules()

+ ((RuleBasedCollator) Collator.getInstance(ULocale.forLanguageTag("und-u-co-emoji"))).getRules());

raw , Z a y ü ☹️ ✈️️ 😀
en , ☹️ ✈️️ 😀 a ü y Z
en-u-co-emoji , a ü y Z 😀 ☹️ ✈️️
da , ☹️ ✈️️ 😀 a y ü Z
da-u-co-emoji , a ü y Z 😀 ☹️ ✈️️
combine , a y ü Z 😀 ☹️ ✈️️

raw = code point comparison
combine = method above for combining rules

Attachments

Change History

comment:1 Changed 3 months ago by mark

  • Owner changed from anybody to mark
  • Priority changed from assess to major
  • Type changed from unknown to spec
  • Status changed from new to accepted
  • Milestone changed from UNSCH to 32

comment:2 Changed 3 months ago by mark

  • Phase changed from dsub to spec-beta

comment:3 Changed 3 months ago by mark

  • Status changed from accepted to reviewing
  • Review set to markus

comment:4 Changed 2 months ago by markus

  • Status changed from reviewing to closed
  • Resolution set to fixed
  • Component changed from unknown to collation
View

Add a comment

Modify Ticket

Action
as closed
Next status will be 'new'
Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.