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

str/bytes/encoding problems on Windows #10

Closed
cfbao opened this issue Mar 29, 2017 · 2 comments
Closed

str/bytes/encoding problems on Windows #10

cfbao opened this issue Mar 29, 2017 · 2 comments

Comments

@cfbao
Copy link

cfbao commented Mar 29, 2017

  • On Windows, subprocess.Popen process arguments as strings, and problem arises when bytes are passed in (a bytes-like object is required, not 'str').
  • Python 3.6 now uses UTF-8 for Windows filesystem and console encoding. Using locale.getdefaultlocale()[1] is not appropriate in this case.

I modified the script, changing all bytes to str and using UTF-8 only, and got a working script on my system (Win 7, Python 3.6), but it probably doesn't work on many other systems. Would love to see this tool improved in this regard.

@bohwaz
Copy link

bohwaz commented Apr 13, 2017

Yup no support for anything else than ASCII here, fails on Linux too. This sucks.

@maik-s
Copy link

maik-s commented Jul 7, 2018

hey @cfbao i ran into the exact same problem and would appreciate it if you would share your modified script.

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

No branches or pull requests

3 participants