Please sign in to comment.
use cp65001 ~ UTF-8 on windows, re #40
The Windows cmd has limited/buggy but existing unicode support. cp65001 is supposed to be UTF-8. It is buggy and has problems and python decided not to add it as an alias for utf-8. Batchfiles are buggy with cp65001, therefore this weird cmd /c change. Since having unicode output is desirable, we alias cp65001 to utf-8, and use os.write in printEncoded on Windows. Using sys.stdout.write gives IOError We also set cp65001 in isrcsubmit.bat Please note, that isrcsubmit.bat will not start if cp65001 is set before starting isrcsubmit.bat If that change in the batchfile turns out to be buggy, we should create a separate isrcsubmit-unicode.bat.
- Loading branch information...
|@@ -1,4 +1,5 @@|
|+for /f "tokens=2 delims=:." %%x in ('chcp') do set cp=%%x|
|+chcp 65001>NUL & cmd /c "isrcsubmit.py %*" & chcp %cp%>NUL|