idle 3.0 unicode

P

Pavel Kosina

As for unicode in Python 2.5 everything works fine in program running
either in IDLE or under Command line:
# -*- coding: utf-8 -*-
print u"ěšÄřžýáíé"

In 3.0 there is an error. The same program, moved to 3.0 syntax, in
IDLE editor :
# -*- coding: utf-8 -*-
print ("ěšÄřžýáíé")

prints:
ěščřžĂËáíé

The same program running in Command line from PSPad editor works fine.
Is it mistake of my misunderstanding or of IDLE?

-------------

The same program without coding declaration (but saved in utf8) :
print ("ěšÄřžýáíé")

even immediately destroyed my IDLE window without any error message.
 


$B>.O0(B

As for unicode in Python 2.5 everything works fine in program running
either in IDLE or under Command line:
# -*- coding: utf-8 -*-
print u"ěšÄřžýáíé"

In 3.0 there is an error.  The same program, moved to 3.0 syntax, in
IDLE editor :
# -*- coding: utf-8 -*-
print ("ěšÄřžýáíé")

prints:
ěščřžĂËáíé

The same program running in Command line from PSPad editor works fine.  
Is it mistake of my misunderstanding or of IDLE?

-------------

The same program without coding declaration (but saved in utf8) :
print ("ěšÄřžýáíé")

even immediately destroyed my IDLE window without any error message.

#coding="utf-8"
#中国
print('a')

saved in utf8
alt+x,destroyed IDLE...
me too,why?
 
P

Pavel Kosina

å°æ¥¼ napsal(a), dne 1.1.2009 10:32:
#coding="utf-8"
#中国
print('a')

saved in utf8
alt+x,destroyed IDLE...
me too,why?

Are you sure? Run (F5) with print('a') is OK here. Maybe you have
redefined key bindings in IDLE ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top