Details
-
Bug
-
Resolution: Won't Do
-
P5: Not important
-
None
-
5.14.1, 5.14.2
-
None
-
Windows 10 (russian locale), python 3.8.2, pyside2 5.14.2 from pip
Description
Example of error:
pyside2-uic utf.ui > utf.py Traceback (most recent call last): File "c:\python382\lib\runpy.py", line 193, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\python382\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\python382\Scripts\pyside2-uic.exe\__main__.py", line 7, in <module> File "c:\python382\lib\site-packages\PySide2\scripts\pyside_tool.py", line 76, in uic qt_tool_wrapper("uic", ['-g', 'python'] + sys.argv[1:]) File "c:\python382\lib\site-packages\PySide2\scripts\pyside_tool.py", line 70, in qt_tool_wrapper msg = err.decode("utf-8") UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe0 in position 42: invalid continuation byte
What is expected:
pyside2-uic utf.ui > utf.py
utf.ui: Warning: Buddy assignment: 'ัะตัั' is not a valid widget.
Tested on several windows10 machines. Linux has no errors.
Expected result I got when I changed
70 msg = err.decode("utf-8")
to
70 msg = err.decode("cp1251")
in file PySide2\scripts\pyside_tool.py
I think it's because Linux's default encoding is UTF-8, and Windows default encoding is cp1251.
Bug works only with Cyrillic symbols. I even tried Japanese - it works without error.