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

fix a bug where tuw can not open paths contain utf-8 characters on windows #81

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

matyalatte
Copy link
Owner

related to #80.
fopen uses ANSI code page (that might not be UTF-8 on some Asian enviroments) on Windows. It can fail to open UTF-8 paths.

[LoadDefinition] ERROR: Failed to open D:\日本語\Tuw.exe

So, I replaced fopen with _wfopen for Windows build.

@matyalatte matyalatte added the bugfix Pull request for bugfix label Feb 3, 2025
@matyalatte matyalatte merged commit d639754 into dev Feb 4, 2025
9 checks passed
@matyalatte matyalatte deleted the fix_utf8_path branch February 4, 2025 12:23
@matyalatte matyalatte added the windows Windows-specific changes label Feb 8, 2025
@matyalatte matyalatte mentioned this pull request Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Pull request for bugfix windows Windows-specific changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant