Skip to content

Fix #1906 GetDirectory UTF16 encoding issue #1907

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
merged 1 commit into from
Aug 14, 2025

Conversation

tomcashman
Copy link
Contributor

Note: I've intentionally used SHGetFolderPathW for compatibility with older systems. Vista + later alias this to SHGetKnownFolderPath.

Copy link
Member

@tobil4sk tobil4sk left a comment

Choose a reason for hiding this comment

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

This looks good to me. According to the microsoft docs:

New applications should always call the Unicode versions. Many world languages require Unicode. If you use ANSI strings, it will be impossible to localize your application.

https://learn.microsoft.com/en-us/windows/win32/learnwin32/working-with-strings

So this seems like the correct approach

@tobil4sk tobil4sk linked an issue Aug 13, 2025 that may be closed by this pull request
@joshtynjala joshtynjala merged commit 52ad5b1 into openfl:develop Aug 14, 2025
@joshtynjala
Copy link
Member

@tobil4sk Thanks for taking a look. Merged!

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.

SDLSystem GetDirectory does not handle UTF16 correctly on Windows
3 participants