+5

Console at bottom of IDE does not seem to support unicode?

Hipposaurus 12 лет назад обновлен Fabio Lamanna 12 лет назад 1
Hello,

I believe this is a new bug. 

When I run my program from the Terminal in python, it runs perfectly.

Whereas, when I run it from sublime text, I get this error:

[... stuff ...]
if amtconf.debug_on: print(s)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u030a' in position 30: ordinal not in range(128)

The error is being caused by the debug statement trying to print a unicode string which contains a directory name including special characters like å and ø.

I've spent 2 hours looking into this and it appears to be an issue where the IO output will not allow unicode strings directly? i.e. I think the console window at the bottom of the IDE should be set to use UTF-8 rather than ascii.  


I have the same problem reading a file with German characters. Run it in Textmate works perfectly, on Sublime Text 2 I've got the same error line on the console:
"UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 16: ordinal not in range(128)".

Сервис поддержки клиентов работает на платформе UserEcho