platomav/MCExtractor

Redirection not work

chupor3d opened this issue · 4 comments

But other thinkgs, that not work:
Previous version works with redirection: MCE1111.exe J01_0231.BIN >a.a
But this version not:
MCE115.exe J01_0231.BIN >a.a or MCE115.exe J01_0231.BIN -skip >a.a
Traceback (most recent call last):
File "MCE.py", line 1179, in
File "site-packages\colorama\ansitowin32.py", line 40, in write
File "site-packages\colorama\ansitowin32.py", line 141, in write
File "site-packages\colorama\ansitowin32.py", line 166, in write_and_convert
File "site-packages\colorama\ansitowin32.py", line 174, in write_plain_text
File "c:\python\python36-32\lib\encodings\cp1250.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-84: character maps to

Read the README > C1. Compatibility

OK, i read C1, put setting in batch, but same error with using mce115.bat
@echo off
SET PYTHONIOENCODING=UTF-8
MCE115.exe %1 -skip -exit >i.txt

It works just fine when using MCE.py script and not the frozen PyInstaller executable. For some reason PyInstaller ignores PYTHONIOENCODING variable but that's not related to MCE. I will add an extra parameter at the next version to disable a certain feature which requires setting PYTHONIOENCODING when redirecting. If you can use the python script though, then I suggest you do that.

Added -redir parameter at MCE v1.16.0 (ba1990a)