[wingide-users] Confused about OS Commands tool box display of unicode data.

Wingware Support support at wingware.com
Mon Mar 19 07:00:23 MDT 2012

Barry Mossman wrote:
> Hi I have read some data from text file encoded with utf-8 as follows:
> with codecs.open(filename='playcounts.txt', mode='r', 
> encoding='utf-8') as scrobble_file:
> data = scrobble_file.readline()
> I then print the data with a print statement.
> If I do this in the debugger, or run the program externally outside 
> the IDE, the displayed output is as expected.
> If I run the program using the OS Comands tool box the print statement 
> fails with “'ascii' codec can't encode character u'\xe1' in position 
> 6: ordinal not in range(128)”
> Is there something I need to configure with regard to the OS Commands 
> toolbox.

You probably need to change the I/O Encoding field in the OS Command's 
definition. You should also have a Debugger > I/O > OS Commands Encoding 
preference (third one on that prefs page).


Stephan Deibel
Wingware | Python IDE
Advancing Software Development


More information about the wingide-users mailing list