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

Fix Japanese Abbreviated Era Names #40300

Merged
merged 6 commits into from
Aug 7, 2020

Conversation

tarekgh
Copy link
Member

@tarekgh tarekgh commented Aug 4, 2020

Fixes #40194

@ghost
Copy link

ghost commented Aug 4, 2020

Tagging subscribers to this area: @tarekgh, @safern, @krwq
See info in area-owners.md if you want to be subscribed.

@tarekgh tarekgh requested a review from safern August 4, 2020 04:33
abbrevEnglishEraNames = s_abbreviatedEnglishEraNames;
}

if (abbrevEnglishEraNames[abbrevEnglishEraNames.Length - 1].Length != 1 || abbrevEnglishEraNames[abbrevEnglishEraNames.Length - 1][0] > '\u007F')
Copy link
Member

Choose a reason for hiding this comment

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

Just to understand this, why would having the Length != 1 of the abbrevEnglishEraNames on the last element or having a character in first position greater than DELETE character is an indicator that we couldn't get the abbreviated english names?

Copy link
Member Author

Choose a reason for hiding this comment

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

The Japanese English abbreviated names so far is only one letter. In some versions of ICU versions (e.g. ver 50) it doesn't return these Latin letters. The check here is indicating if we have Latin or non Latin names. The check here is enough. I may remove the length check just in case in the future we'll get more than one letter (which unlikely but it is possible).

Copy link
Member

Choose a reason for hiding this comment

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

I see, makes sense. Thanks for explaining!

@safern
Copy link
Member

safern commented Aug 6, 2020

ApiCompat failure is: #40416

@tarekgh tarekgh closed this Aug 6, 2020
@tarekgh tarekgh reopened this Aug 6, 2020
@tarekgh tarekgh merged commit 2b93f83 into dotnet:master Aug 7, 2020
@tarekgh tarekgh deleted the FixAbbreviatedJapaneseEraNames branch August 7, 2020 16:18
Jacksondr5 pushed a commit to Jacksondr5/runtime that referenced this pull request Aug 10, 2020
@karelz karelz added this to the 5.0.0 milestone Aug 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DateTimeFormatInfo.GetEra(string) does not work in a scenario
4 participants