-
Notifications
You must be signed in to change notification settings - Fork 126
Fix for windows time zone name and other Unicode issues #1375
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 8f5df9b.
Integration test with FLAKINESS (succeeded after retry)Requested by @jonsimantov on commit 4fd4ce9
Add flaky tests to go/fpl-cpp-flake-tracker |
…irebase/firebase-cpp-sdk into fix-for-windows-time-zone-name
…ve a test for it.
…irebase/firebase-cpp-sdk into fix-for-windows-time-zone-name
…irebase/firebase-cpp-sdk into fix-for-windows-time-zone-name
…irebase/firebase-cpp-sdk into fix-for-windows-time-zone-name
a-maurice
approved these changes
Jul 5, 2023
tom-andersen
pushed a commit
that referenced
this pull request
Jul 17, 2023
* Fix for Unicode characters above U+FFFF. * Add error handling to time zone conversion. * Fix scoping error. * Convert Windows TZ environment variable from CP-1252 to Unicode. * Don't use a variable length array. * Fix compiler error. * Modify readme. * Fix array lookup. * Update readme. * Also fix the fallback daylight saving time string encoding. * Rephrase readme. * Add unit test for conversions on Windows. * Add test for CP1252 conversion and fix conversion function that we have a test for it. * Remove duplicate code. * Add missing platform header. * Add additional characters to locale test. * Let's go wild, even more characters. This should cover most of what we need. * Format code. * Modified locale test to work with Windows wchar_t. * Format code. * Set thread language to English and use GetTimeZoneInformation. * Format code. * Add a comment about why we don't use daylight savings time in one spot.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This fixes two issues: UTF-8 characters that can't fit into a single UTF-16 character, and obtaining the Windows time zone name.
Turns out we do need to use SetThreadUILanguage and GetTimeZoneInformation to get the time zone name in English, which can then be converted to IANA time zone format via the conversion library added earlier.
Testing
Integration test in this PR, plus unit test. Also tested by user reporting the bug in #1367.
Type of Change
Place an
x
the applicable box:Notes
Release Notes
section ofrelease_build_files/readme.md
.