UnicodeEncodeError

Ali art biltar at hotmail.com
Mon Dec 15 08:03:12 EST 2008


Hello!
I am using Windows XP professional version 2002 Service pack 3. AMD Athlon(TM)XP 2400+ 2.00GHz 992MB RAM.
I have downloaded Windows x86 MSI Instaler Python 3.0 (sig) (r30:67507, Dec  3 2008, 20:14:27) [MSC v.1500 32 bit (Intel)] on win32 
Control Panel -> System -> Advanced -> Environment Variables. System Variables -> Path -> edit C:\Windows\System32\Wbem;C:\Python30
start -> programs -> python 3.0 -> IDLE(Python GUI) 
-> IDLE 3.0 -> File -> New Window -> i wrote "print('ğüşçöı')" without qutes-> File -> Save -> Python30 -> i gave file name "d2.py" without qutes-> and Run -> Run Module -> it gives error "invalid character in identifier"
then i tried second method
start -> run -> cmd -> d2.py and enter it gives the error
C:\>d2.pyTraceback (most recent call last):  File "C:\Python30\d2.py", line 4, in <module>    print('\u011fü\u015fçö\u0131')  File "C:\Python30\lib\io.py", line 1491, in write    b = encoder.encode(s)  File "C:\Python30\lib\encodings\cp437.py", line 19, in encode    return codecs.charmap_encode(input,self.errors,encoding_map)[0]UnicodeEncodeError: 'charmap' codec can't encode character '\u011f' in position0: character maps to <undefined>
C:\>
But if i write in Phyton Shell -> >>> print('ğüşçöı') and pressed enter -> gives 'ğüşçöı' it works.
What is wrong?
all the best
_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20081215/d4b81eb9/attachment-0001.html>


More information about the Python-list mailing list