[wingide-users] Display Unicode strings in console?

Wingware Support support at wingware.com
Wed Mar 19 08:26:08 EDT 2014


Graham Wideman wrote:
> For Python3.3+  on Windows 7, I'm hoping for a way to get strings that contain characters with code points>  255 to display in the WingIDE debug I/O window (and also in the Windows console).
>
> I've read a bunch of documentation and stackoverflow trying to divine whether this is even possible. It is claimed that there are some issues with Windows console itself, and some with Python's interface to Windows console, so perhaps it's not. (And none of the suggested remedies I ran across seem to solve the problem).
>
> Also, it's not clear to me whether the WingIDE debug I/O window behaves exactly like Windows console in these respects.
>
> Anyhow, I'd like a definitive answer so I can quit looking:-).
>
> I do realize that by using the ascii() function, or .encode('utf-8'), it's possible for such a string to print with the>127 or>255 code points rendered in hex (or as html entities, etc), but what I am hoping is a way for their proper glyphs to appear.
>
> Any solutions? Thanks!

In Wing you need to set the Debugger > I/O > Debug I/O Encoding 
preference to match the encoding of the text you are printing from your 
Python code.  I'm not sure about Windows console.  You may just need to 
use the encoding it expects.

-- 

Stephan Deibel
Wingware | Python IDE

The Intelligent Development Environment for Python Programmers

wingware.com



More information about the wingide-users mailing list