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

Sync locale with child processes on Windows #36

Open
matyalatte opened this issue Jun 30, 2024 · 1 comment
Open

Sync locale with child processes on Windows #36

matyalatte opened this issue Jun 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@matyalatte
Copy link
Owner

matyalatte commented Jun 30, 2024

Related to #34.
A typical nightmare due to Windows locale.
Tuw can show garbled strings if a child process does not use the default locale.
I should find a way to get locale for child processes or provide an option to set it by users.

I think there is nothing to do for unix-like systems because they use utf-8 basically.

@matyalatte matyalatte added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Jun 30, 2024
@matyalatte
Copy link
Owner Author

Supporting all locales would be hard to test, so I decided to support utf-8 only.
I'll add an option codepage.

{
    "label": "UTF-8 output",
    "command": "a command that outputs utf-8 strings",
    "codepage": "utf-8",
    "components": []
 }

When utf-8 or utf8, tuw converts utf-8 strings to wstrings on Windows.
When default, tuw redirects output strings as it is.
Non-Windows platforms ignore the option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant