does raw_input() return unicode?

Stuart McGraw smcg4191zz at friizz.RimoovAllZZs.com
Tue Oct 10 01:36:12 CEST 2006


In the announcement for Python-2.3 
http://groups.google.com/group/comp.lang.python/msg/287e94d9fe25388d?hl=en
it says "raw_input(): can now return Unicode objects".

But I didn't see anything about this in Andrew Kuchling's
"2.3 What's New", nor does the current python docs for 
raw_input() say anything about this.  A test on a MS 
Windows system with a cp932 (japanese) default locale 
shows the object returned by raw_input() is a str() object 
containing cp932 encoded text.  This remained true even
when I set Python's default encoding to cp932 (in 
sitecustomize.py).

So, does raw_input() ever return unicode objects and if
so, under what conditions?




More information about the Python-list mailing list