-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Windows: Use /utf-8 compiler flag #87340
Comments
When building Python on Windows Japanese environment, several warnings are shown.
These warnings are shown because source code is written in UTF-8 but compiler assume it's encoded in current code page. I don't know what is the best way to fix the warning, but I can fix it by adding /utf-8 flag.
|
The new property should go into PCbuild/pyproject.props, but otherwise seems like an okay change. It *will* cause any string literals (const char *) to be UTF-8, but they ought to all be ASCII anyway. It shouldn't affect resource files, because those have a code page override in the source files. (Potentially a "#pragma code_page(1252)" might make more sense for our build, but I'm not sure, and I'm just as happy to got to UTF-8 if it doesn't break anything.) |
May I backport this for Python 3.9? |
I think so, yeah. We shouldn't have any string literals that are non-ASCII, but if we do then it's almost certainly an improvement for them to be UTF-8. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: