Unicode, command-line and idle

Méta-MCI enleverlesX.XmcX at XmclaveauX.com
Thu Apr 6 08:22:41 EDT 2006


(just for confirm)


Hi!


if the console is in cp1252, raw_input  work OK with "ñ"

This (your) script :


# -*- coding: cp1252 -*-

import sys
text1 = u'españa'
text2 = unicode(raw_input(), sys.stdin.encoding)
if text1 == text2:
    print 'same'
else:
    print 'not same'


work OK with "chcp 850"  AND  "chcp 1252"





@-salutations

Michel Claveau






More information about the Python-list mailing list