Python 2 (only?): log-pane is unicode unfriendly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
leo-editor |
Fix Released
|
Wishlist
|
Edward K. Ream |
Bug Description
When using python 2, it seems the log pane is unicode unfriendly. The following script demonstrates this:
g.es('é')
Log output:
exception executing script
File "C:\Documents and Settings\
SyntaxError: Non-ASCII character '\xc3' in file C:\Documents and Settings\
-------
line 11:
* line 12: g.es('��')
<...snip...>
Simple fix to stop the error, but not fix the log output:
@first # -*- coding: utf-8 -*-
g.es('é')
New log output:
��
That doesn't look like é to me.
I can fix this by setting 'console_encoding' to 'utf-8' in g.translateArgs (forcing unicode encoding), but this is an ugly fix.
Changed in leo-editor: | |
importance: | Undecided → Low |
Changed in leo-editor: | |
status: | Confirmed → Fix Released |
As a side note: should Leo insert a '# -*- coding: utf-8 -*-' into scriptFile.py? I think it would be far more convenient for users if it did...