Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert #56 - ICU-21301 fix #60

Merged
merged 1 commit into from
Jun 25, 2024
Merged

Revert #56 - ICU-21301 fix #60

merged 1 commit into from
Jun 25, 2024

Conversation

yoikawa
Copy link
Contributor

@yoikawa yoikawa commented Jun 24, 2024

Roll back immature fix (hack, actually) #56 (3bdc924)
ICU-21301 remains in this release.

java.text.DateFormat(int, Locale) does not guarantee to return JDK object, but could be ICU depends on java.locale.providers system property setting. Using sun.util.locale.provider.LocaleProviderAdapter.forJRE().getDateFormatProvider() can enforce JDK instance, but yet decided because:

  1. it's JDK internal API
  2. for zh-TW locale, date/time format pattern in ICU/CLDR contains B. JDK's SimpleDateFormat does not understand it and throws an exception when SimpleDateFormat#applyPattern(String) is called. It's easy to replace B with a, the am/pm marker but it's not what Traditional Chinese user would expect.
  3. SimpleDateFormat.setLenient(true) would skip this bug

@ytanida ytanida self-requested a review June 24, 2024 21:19
@yoikawa yoikawa merged commit 887d5c3 into main Jun 25, 2024
4 checks passed
@yoikawa yoikawa deleted the revert-ICU-21301-fix branch June 25, 2024 02:04
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.

2 participants