Skip to content

CLDR-19254 v48 json nested bracket fix#5391

Merged
srl295 merged 1 commit intounicode-org:maint/maint-48from
srl295:cldr-19254/json-nested-bracket
Feb 24, 2026
Merged

CLDR-19254 v48 json nested bracket fix#5391
srl295 merged 1 commit intounicode-org:maint/maint-48from
srl295:cldr-19254/json-nested-bracket

Conversation

@srl295
Copy link
Member

@srl295 srl295 commented Feb 24, 2026

CLDR-19254

will need backport.

+        "nestedBracketReplacement": {
+          "(": "[",
+          "(": "[",
+          ")": "]",
+          ")": "]"
+        },
         "moreInformation": "?",
         "lenient-scope-date": {
           "-": "[\\- ‑ . /]",

Nested bracket ticket is CLDR-17223

@srl295 srl295 changed the base branch from main to maint/maint-48 February 24, 2026 00:53
@srl295 srl295 changed the title cldr 19254/json nested bracket CLDR-19254 v48 json nested bracket fix Feb 24, 2026
@srl295 srl295 requested review from a team, pedberg-icu and sffc February 24, 2026 00:53
Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm 70% confident that using localized strings in keys like this won't cause problems. @Manishearth agrees that it is fine. CC @robertbastian @pedberg-icu

@srl295
Copy link
Member Author

srl295 commented Feb 24, 2026

Not sure why it's stuck

@srl295 srl295 closed this Feb 24, 2026
@srl295 srl295 reopened this Feb 24, 2026
@pedberg-icu
Copy link
Contributor

I'm 70% confident that using localized strings in keys like this won't cause problems. @Manishearth agrees that it is fine. CC @robertbastian @pedberg-icu

It definitely does in the cldr-icu tooling: if in tools/cldr/cldr-to-icu/src/main/resources/ldml2icu_locale.txt I tried to use

//ldml/characters/nestedBracketReplacement[@bracket="(%A)"]  ; /nestedBracketReplacement/$1

(or quoting the $1) I got from LdmlConverter

Exception in thread "main" java.lang.IllegalArgumentException: invalid character in unquoted resource bundle path segment: (

@srl295
Copy link
Member Author

srl295 commented Feb 24, 2026

I'm 70% confident that using localized strings in keys like this won't cause problems. @Manishearth agrees that it is fine. CC @robertbastian @pedberg-icu

It definitely does in the cldr-icu tooling: if in tools/cldr/cldr-to-icu/src/main/resources/ldml2icu_locale.txt I tried to use


//ldml/characters/nestedBracketReplacement[@bracket="(%A)"]  ; /nestedBracketReplacement/$1

(or quoting the $1) I got from LdmlConverter


Exception in thread "main" java.lang.IllegalArgumentException: invalid character in unquoted resource bundle path segment: (

If it were quoted would it work ?

@srl295 srl295 merged commit 0a54a4f into unicode-org:maint/maint-48 Feb 24, 2026
14 checks passed
@sffc
Copy link
Member

sffc commented Feb 24, 2026

(I was referring to problems specifically in consuming the JSON.)

@srl295 srl295 deleted the cldr-19254/json-nested-bracket branch February 24, 2026 14:52
@srl295
Copy link
Member Author

srl295 commented Feb 24, 2026

I'm 70% confident that using localized strings in keys like this won't cause problems. @Manishearth agrees that it is fine. CC @robertbastian @pedberg-icu

It definitely does in the cldr-icu tooling: if in tools/cldr/cldr-to-icu/src/main/resources/ldml2icu_locale.txt I tried to use


//ldml/characters/nestedBracketReplacement[@bracket="(%A)"]  ; /nestedBracketReplacement/$1

(or quoting the $1) I got from LdmlConverter


Exception in thread "main" java.lang.IllegalArgumentException: invalid character in unquoted resource bundle path segment: (

ICU's key space is invariant safe ascii or ebcdic I think.

JSON should be ok with anything that's not certain spacing or illegal chars.

srl295 added a commit to unicode-org/cldr-json that referenced this pull request Feb 24, 2026
includes nested bracket fix

48.2.0-BETA0b

Fix: unicode-org/cldr#5391
@pedberg-icu
Copy link
Contributor

ICU's key space is invariant safe ascii or ebcdic I think.

@robert @sffc @srl295 Yes, ICU resource bundle keys must be invariant chars (subset of ASCII): See https://unicode-org.github.io/icu/userguide/locale/resources.html#accessing-by-key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants