FAQ
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.

--
geon
Pavel Kosina

Search Discussions

  • 小楼 at Jan 1, 2009 at 9:32 am

    On 1?1?, ??4?11?, Pavel Kosina wrote:
    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.

    --
    geon
    Pavel Kosina
    #coding="utf-8"
    #??
    print('a')

    saved in utf8
    alt+x,destroyed IDLE...
    me too,why?
  • Pavel Kosina at Jan 1, 2009 at 10:06 am

    ?? 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 ...

    --
    geon
    Pavel Kosina
  • Mark Tolonen at Jan 1, 2009 at 7:12 pm
    "Pavel Kosina" <geon at post.cz> wrote in message
    news:495C7AC6.1000506 at post.cz...
    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.
    Both versions, with and without 'coding' line, destroy IDLE for me. Looks
    like a bug in IDLE 3.0.

    The print works fine from the shell, but not from a program run with F5.

    -Mark
  • Gabriel Genellina at Jan 6, 2009 at 2:42 am

    En Thu, 01 Jan 2009 06:11:50 -0200, Pavel Kosina <geon at post.cz> escribi?:

    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 without coding declaration (but saved in utf8) :
    print ("?????????")

    even immediately destroyed my IDLE window without any error message.
    There are some unicode-related errors reported for IDLE and 3.0, but I
    could not find this one. Better to file a bug report at
    http://bugs.python.org

    --
    Gabriel Genellina

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJan 1, '09 at 8:11a
activeJan 6, '09 at 2:42a
posts5
users4
websitepython.org

People

Translate

site design / logo © 2022 Grokbase