Hi, Could you test the following example for your non-English language with accented characters?
I have observed a problem when running Python 2.4, Windows version (python-2.4.msi) and using raw_input() with unicode prompt string in a console program (ran in the DOS window). I do use the following sitecustomize file to set the default encoding: sitecustomize.py ================================= import sys sys.setdefaultencoding('cp1250') ================================= test.py ================================= # -*- coding: cp1250 -*- s = u'string with accented letters' print s # OK val = raw_input(s) # s displayed differently (wrong) ================================= ... when run in a DOS window. See the attached test.png. The "type test.py" displays the string definition also wrong, because the DOS window uses different encoding than cp1250. The print command prints the string correctly, converting the internal unicode string to the encoding that the is defined by the output environment. However, the raw_input() probably does convert the unicode string to the cp1250 and does not do the same (more clever) thing that the print does. Could you confirm the bug? Is it known? Should this be posted into some bug-report list? Petr python test.py I have observed t -- Petr Prikryl (prikrylp at skil dot cz)
test.py
Description: test.py
<<attachment: test.png>>
-- http://mail.python.org/mailman/listinfo/python-list