-
Notifications
You must be signed in to change notification settings - Fork 120
Windows: Convert path from UTF-8 to UTF-16 before loading google-services.json #1383
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
Conversation
Integration test with FLAKINESS (succeeded after retry)Requested by @jonsimantov on commit 41dc1be
Add flaky tests to go/fpl-cpp-flake-tracker |
bool loaded_options = false; | ||
#if FIREBASE_PLATFORM_WINDOWS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: For testing, if you change this line to "#if 0", the new unit tests fail (as expected). With it as-is, the tests pass.
…rebase/firebase-cpp-sdk into fix-unicode-windows-json-load
… JSON. (#1383) * Convert path to UTF-16 before loading, for google services JSON. * When testing on desktop, use a folder with i18l characters. * Add App Desktop test, and JSON parsing from international path. * Format code. * Clean up test code. * Remove debug code. * Update copyright year. * Add release note. * Whitespace. * Format. * Add missing header for rmdir, mkdir, etc. * Fix C system call syntax. * Add missing directory mode.
Description
On Desktop, when the Unity SDK sets the default google-services.json file path, it uses UTF-8 to encode the string. This PR modifies the JSON load method to properly convert the filename to UTF-16 before loading it on Windows, so that the file loads correctly from paths containing international characters.
Testing
Unit test added to ensure that the json file can be loaded from international paths.
Unity SDK was built against this branch, and manually verified that it was able to run the Remote Config testapp on Windows from a folder containing international characters.
(The Unity SDK built against head is unable to load the google-services.json file from a directory with international characters.)
Type of Change
Place an
x
the applicable box:Notes
Release Notes
section ofrelease_build_files/readme.md
.