-
Notifications
You must be signed in to change notification settings - Fork 269
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] Python + UTF-8 Encoding? #214
Comments
I heard that Windows is using UTF-16 encoding in its console. Maybe that's the reason for this issue? EditI'm using Windows 8.1 64-bit. I installed ATOM via Chocolatey and am using the packages atom-beautify, color picker, minimap and atom-keymap-compatible (unofficial package for resolving this issue: atom/atom-keymap#35 ) |
Still have this problem with Atom 0.141.0 and Script 2.13.0 Did you try enforcing a UTF-8 encoding before it hits the "script-console"? |
As mentioned by @poliorcetics this is an issue in Mac OS X too. We could both produce it under Yosemite. Adding the following comment to a Python file: # é Causes this issue for either of us:
As noted in the PEP-0263 reference adding the annotation will fix the issue. This is the suggested fix, but for easy use the below changes could fix this within the Script package.
|
@Braintelligence can you confirm whether adding the special coding comment resolves this issue for you? I believe it resolved #252. |
I'm very sorry but I am not using Atom editor anymore since this issue is going on for over a year now: atom/atom-keymap#35 For me this editor is not being maintained properly till proven otherwise. |
@erran Adding the utf-8 comment to the top of the file doesn't stop it from showing the question marks for me. Python 3.5.1, Atom 1.3.2, Windows 10. |
@erran and @Braintelligence I was able to find a workaround to the problem. For me, it looks like atom-script on Windows uses cp1252 (Windows 1252) encoding by default instead of utf-8 (the default encoding may depend on your locale and platform). As a work-around you can specify the encoding as utf-8 in your code for the system out and error streams:
|
@dbolton Thanks, but I really moved on and am now very happy with PyCharm. :) |
I haven't looked at script source codes, but shouldn't this have easy solution? Isn't it possible to just change encoding for console view on Windows? |
After 2 years this problem still exists. |
If you've got a fix, please submit a pull request. |
@sinedanat after 3 years. And counting. VS Code is starting to look more and more inviting. |
I highly recommend using Hydrogen over this module for running your code. I don't have time to work on this one. |
Estou executando este codigo
print "EXPEDIÇÃO DE DESPACHO" e esta saindo: EXPEDI├ç├âO DE DESPACHO |
Almost 4 years! |
solution found on internet : create a environment variable PYTHONIOENCODING=utf-8 |
🎉 This issue has been resolved in version 3.31.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hi there,
when executing Python3 code with
Where STRING contains letters like
öüä
, there's a problem with the encoding. It shows as�
. (While the console in windows command prompt shows it correctly.)If I use
#coding=latin-1
it works but this shouldn't be necessary!Sorry if I missed this issue within the others.
Please help me out =(
The text was updated successfully, but these errors were encountered: