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

Paths on Windows are now correctly converted from UTF-8 to UTF-16 #607

Merged
merged 2 commits into from
Jan 9, 2022

Conversation

doomlaur
Copy link
Contributor

@doomlaur doomlaur commented Dec 9, 2021

Until now, paths on Windows were converted from UTF-8 to UCS-2 instead of being converted to UTF-16. This pull request fixes issues with file paths that use 2 wchar_t characters / 4 bytes, also called surrogate pairs. These are allowed in UTF-16 but not in UCS-2. I also modified the unit tests to test this case.

doomlaur and others added 2 commits December 9, 2021 16:42
…tead of UCS-2. This fixes issues with file paths that use 2 wchar_t characters / 4 bytes, also called surrogate pairs. Modified the unit tests to test this case.
Copy link
Owner

@tfussell tfussell left a comment

Choose a reason for hiding this comment

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

I'm surprised this took so long to notice. LGTM.

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.

None yet

2 participants