Unicode, command-line and idle

2006-04-06 Thread a . serrano
Hello, the following program prompts the user for a word and tests to see if it is the same as another one. If the user types "españa" (note that the word contains an 'ñ'), the program should output "same". This works if I run the code in IDLE but does not if I run it in the windows console. Can so

Re: Unicode, command-line and idle

2006-04-06 Thread a . serrano
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > Hello, the following program prompts the user for a word and tests to > > see if it is the same as another one. If the user types "españa" (note > > that the word contains an 'ñ'), the program should output "same". This > > works if I run the co

Re: Unicode, command-line and idle

2006-04-06 Thread a . serrano
Martin v. Löwis wrote: > [EMAIL PROTECTED] wrote: > > This works if I use the console but gives the following error if I use > > IDLE: > > > > Traceback (most recent call last): > > File "C:\test.py", line 4, in ? > > text2 = unicode(raw_input(), sys.stdin.encoding) > > AttributeError: PyShe

Re: Unicode, command-line and idle

2006-04-11 Thread a . serrano
Hello again, I've investigated a little bit and this is what I found: If I run IDLE and type >>> import sys >>> sys.stdin.encoding I get 'cp1252' But if I have a whatever.py file (it can even be a blank file), I edit it with IDLE, I press F5 (Run Module) and then type: >>> import sys >>> sys.