[CP-stable]Ensure that the engine converts std::filesystem::path objects to UTF-8 strings on Windows#179707
Conversation
…8 strings on Windows (flutter#179528) Fixes flutter#178896 --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
@jason-simmons please fill out the PR description above, afterwards the release team will review this request. |
|
This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter. Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed. |
There was a problem hiding this comment.
Code Review
This pull request introduces a new utility function fml::PathToUtf8 to correctly convert std::filesystem::path objects to UTF-8 encoded std::strings. This is particularly important on Windows to handle paths with non-ASCII characters correctly. The new function is consistently applied across the codebase, replacing previous methods that could lead to incorrect string encoding. The changes are logical, include corresponding unit tests, and effectively resolve the underlying issue. The implementation is clean and follows best practices. I found no issues of medium or higher severity.
d7b4253
into
flutter:flutter-3.38-candidate.0
…ath objects to UTF-8 strings on Windows (flutter/flutter#179707)
Issue Link:
#178896
Changelog Description:
Fixes an issue that makes Windows apps unable to launch when placed in a path containing non-ASCII characters.
Impact Description:
Apps crash during launch on Windows when run from paths containing non-ASCII characters.
Workaround:
Install the app at a different path.
Risk:
What is the risk level of this cherry-pick?
Test Coverage:
Are you confident that your fix is well-tested by automated tests?
Validation Steps:
Build a Flutter app targeting Windows and move the build output to a directory containing a non-ASCII character. Verify that the app runs when launched from that directory.