Add code to 'fix' python encoding and it's unit test.
With this code in action, I can successfully print arabic and chinese on linux and cygwin. It fails to print chinese on my Mac but prints arabic. It prints '?' on Windows console but it *doesn't throw* which is the biggest improvement here. It was particularly a problem on windows because WindowsError's description text is in the current ANSI code page so it failed to print if the text was not pure ASCII, like error message when using Windows' French UI. R=dpranke@chromium.org BUG=none TEST=manual unit test ./tests/fix_encoding_test.py and it shouldn't throw Review URL: http://codereview.chromium.org/6676090 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79006 0039d316-1c4b-4281-b951-d872f2087c98
Showing
fix_encoding.py
0 → 100644
This diff is collapsed.
tests/fix_encoding_test.py
0 → 100755
Please
register
or
sign in
to comment