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

ICU-22568 return TimeZomeFormat::createInstance for bogus locale #2696

Conversation

FrankYFTang
Copy link
Contributor

@FrankYFTang FrankYFTang commented Nov 6, 2023

Use local UErrorCode and proper error handling to continue the TimeZomeFormat::createInstance when the locale is bogus.

Checklist
  • Required: Issue filed: https://unicode-org.atlassian.net/browse/ICU-22568
  • Required: The PR title must be prefixed with a JIRA Issue number.
  • Required: The PR description must include the link to the Jira Issue, for example by completing the URL in the first checklist item
  • Required: Each commit message must be prefixed with a JIRA Issue number.
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable

@FrankYFTang
Copy link
Contributor Author

@markusicu friendly ping

Copy link
Contributor

@richgillam richgillam left a comment

Choose a reason for hiding this comment

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

The code looks fine, but I'm a little unclear-- you now get back a valid TimeZoneFormat when you pass in a bogus locale ID, but what does it do, and what locale is it using? Does it always throw error, or is it just an ordinary TimeZoneFormat based on the root locale? Or something else?

@FrankYFTang FrankYFTang merged commit d93c7b6 into unicode-org:main Dec 1, 2023
100 checks passed
@FrankYFTang FrankYFTang deleted the ICU-22568-bogusLocaleToCreateTimeZoneFormat branch December 1, 2023 23:10
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