Andrew Svetlov andrew.svet...@gmail.com added the comment:
Fixed in #14200
--
assignee: - asvetlov
resolution: fixed - duplicate
stage: commit review - committed/rejected
status: open - closed
superseder: - Idle shell crash on printing non-BMP unicode character
versions: -Python 2.7,
Roger Serwy roger.se...@gmail.com added the comment:
Rather than raising a ValueError, would UnicodeEncodeError be more appropriate?
I admit that this suggestion may be bike shedding.
--
___
Python tracker rep...@bugs.python.org
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
nosy: +asvetlov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12342
___
___
Roger Serwy roger.se...@gmail.com added the comment:
I agree with Terry. The current behavior of raising ValueError will lead to
problems in application code in the future if Tkinter gets fixed such that it
can render Unicode properly beyond 0x.
--
Terry J. Reedy tjre...@udel.edu added the comment:
In responding to #14200, it occurred to me that better than an exception would
be doing what the interpreter does in Command Prompt window, which is expand
high chars to '\U0001' escaped form.
--
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 5f49b496d161 by Victor Stinner in branch 'default':
Issue #12342: Fix compilation on Mac OS X
http://hg.python.org/cpython/rev/5f49b496d161
--
___
Python tracker
STINNER Victor victor.stin...@haypocalc.com added the comment:
Here is the patch as a .patch file.
--
keywords: +patch
Added file: http://bugs.python.org/file23607/tcl_unicode_range.patch
___
Python tracker rep...@bugs.python.org
Martin v. Löwis mar...@v.loewis.de added the comment:
I'm not sure whether the wording is good English, but apart from that, the
patch looks fine.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12342
Terry J. Reedy tjre...@udel.edu added the comment:
The patch implements my suggestion. Looking again, I think the English is fine
;-).
--
stage: - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12342
Ezio Melotti ezio.melo...@gmail.com added the comment:
You could say Unicode character ... in the error to make clear what kind of
range is U+-U+ (people that are not familiar with Unicode and BMP chars
might wonder if that's some tcl/tk thing).
--
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 9a07b73abdb1 by Victor Stinner in branch '3.2':
Issue #12342: Improve _tkinter error message on unencodable character
http://hg.python.org/cpython/rev/9a07b73abdb1
New changeset 5aea95d41ad2 by Victor Stinner in
STINNER Victor victor.stin...@haypocalc.com added the comment:
_tkinter now raises ValueError(character U+10 is above the range
(U+-U+) allowed by Tcl).
You could say Unicode character ... in the error to make clear
what kind of range is U+-U+ (people that are not
Florent Xicluna florent.xicl...@gmail.com added the comment:
Failed to build these modules: (3.3 on Snow Leopard)
_tkinter
./cpython/Modules/_tkinter.c: In function ‘AsObj’:
./cpython/Modules/_tkinter.c:996: warning: dereferencing ‘void *’ pointer
./cpython/Modules/_tkinter.c:996: error:
Ned Deily n...@acm.org added the comment:
(Merging CC list from duplicate Issue13265.
--
nosy: +ezio.melotti, kbk, maniram.maniram, serwy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12342
Martin v. Löwis mar...@v.loewis.de added the comment:
Changing the error message sounds fine to me.
People in need of the feature should lobby their system vendors to provide a
Tcl build that uses a 32-bit Tcl_UniChar. Not sure whether it would actually
render the string correctly, but at
STINNER Victor victor.stin...@haypocalc.com added the comment:
Instead of
ValueError: unsupported character
I suggest:
ValueError: unsupported character (U+1): Tcl doesn't support characters
outside U+-U+ range
What do you think?
--
Terry J. Reedy tjre...@udel.edu added the comment:
ValueError: unsupported character (U+1): Tcl doesn't support characters
outside U+-U+ range
Slightly shorter and without the double :s.
ValueError: character U+1 is above the range (U+-U+) allowed by
Tcl/Tk.
I agree
R. David Murray rdmur...@bitdance.com added the comment:
Judging from the stack trace, it isn't str.format that's failing, it's tk
failing to display it.
--
nosy: +r.david.murray, terry.reedy
title: characters with ord above 65535 fail conversion with str.format for
'{:c}' in IDLE -
STINNER Victor victor.stin...@haypocalc.com added the comment:
U+1 is not the most common character in fonts. You should try another
character in U+1-U+10 range (non-BMP characters). The new funny
emoticon are in this range, but I don't know if your Ubuntu setup includes a
font
Ned Deily n...@acm.org added the comment:
From the discussions here, http://wiki.tcl.tk/1364, it appears that Tcl 8.5
(and earlier) does not support Unicode code points outside the BMP range as in
this example. I don't think there is anything practical IDLE or tkinter can do
about that.
STINNER Victor victor.stin...@haypocalc.com added the comment:
From the discussions here, http://wiki.tcl.tk/1364, it appears that Tcl
8.5 (and earlier) does not support Unicode code points outside
the BMP range as in this example.
Extract of http://wiki.tcl.tk/1364 :
RS 2008-07-09: Unicode
Ned Deily n...@acm.org added the comment:
It looks like that error message has been in _tkinter.c since 2002:
http://svn.python.org/view/python/trunk/Modules/_tkinter.c?r1=28989r2=28990;
I suppose it could be slightly more informative but it seems pretty unambiguous
to me. Martin, any
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12342
___
___
Python-bugs-list
23 matches
Mail list logo