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

CLDR Ticket #10703(design spec)

Opened 10 months ago

Last modified 2 months ago

Clarify behavior of empty and identical negative subpattern

Reported by: shane Owned by: mark
Component: numbers Data Locale:
Phase: rc Review:
Weeks: Data Xpath:


Description (last modified by shane) (diff)

Follow-up on ICU ticket 13117.

The question is what should be the behavior with the patterns "0;" and "0;0". The relevant section from the spec (LDML) says,

When there is no explicit negative subpattern, an implicit negative subpattern is formed from the positive pattern with a prefixed - (ASCII U+002D HYPHEN-MINUS).

What should be the behavior? Here is what I think makes the most sense. In particular, if we are given a negative subpattern, we should respect it. Note: This is the behavior in ICU4J 59.

0 0; 0;0
15 15 15 15
-15 -15 -15 15

Here is the behavior of Excel (see screenshot). It produces an empty string for an empty pattern, which might be OK for us, too:

0 0; 0;0
15 15 15 15
-15 -15 <empty> 15


ICU4C and older versions of ICU4J put a negative sign on the last entry in the table. I think this is wrong because we are not respecting the user's explicit negative subpattern:

0 0; 0;0
15 15 15 15
-15 -15 -15 -15


Change History

comment:1 Changed 10 months ago by shane

  • Description modified (diff)

comment:2 Changed 10 months ago by mark

  • Owner changed from anybody to mark
  • Priority changed from assess to major
  • Xref set to 10207
  • Status changed from new to accepted
  • Milestone changed from UNSCH to 33

overtakes ticket:10207

We were not able to come to consensus, especially coming so close to the release, so will revisit next release.

comment:3 Changed 8 months ago by mark

  • Phase changed from dsub to rc

comment:4 Changed 5 months ago by mark

  • Phase changed from rc to spec-beta

comment:5 Changed 4 months ago by mark

  • Status changed from accepted to design

Whoops, in the ticket queue had thought that this was just documenting an agreement, but it appears that we don't yet have consensus. Pushing to design.

comment:6 Changed 4 months ago by mark

  • Phase changed from spec-beta to dsub
  • Milestone changed from 33 to 34

comment:7 Changed 3 months ago by shane

My recommended behavior, the one in ICU4J 59, will also be the behavior of ICU4C 62 unless I hear otherwise.

comment:8 Changed 3 months ago by mark

  • Keywords google added

Add google keyword: should also add GoogleIssue:XXX if available

comment:9 Changed 3 months ago by mark

  • Phase changed from dsub to rc

comment:10 Changed 2 months ago by pedberg

Agreed in TC that spec should say that "0;0" formats negative value with no sign (ICU4J behavior). Q about "0;"


Add a comment

Modify Ticket

as design

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

Note: See TracTickets for help on using tickets.