[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2017-11-25 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2015-12-06 Thread irdb

Changes by irdb :


--
nosy: +irdb

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2015-11-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am puzzled at the following.  Some reported today that IDLE crashed when 
pasting the Snake emoji U+1F40D .  I copied from Thunderbird and pasted in 
IDLE on Win10, with same UnicodeDecodeError as before.  I then ran this simple 
code

from tkinter import *  # 3.4, 3.5, 2.7 with Tkinter
root = Tk()
text = Text(root)
text.pack()
text.focus_set()  # required to work
root.mainloop()

pasted the char there, and to my surprise, a black & white version of the snake 
appeared. How?  I thought tk does not support astral chars? I copied from the 
Text window to paste above, where it is green for me.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2015-11-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is no the Snake emoji in my font, I use the Cat Face emoji U+1F431  
(\xf0\x9f\x90\xb1 in UTF-8, \x3d\xd8\x31\xdc in UTF-16LE).

Move cursor or press Backspace. I had needed to press Left 2 times to move 
cursor to the begin of the line, press Right 4 times to move cursor back to the 
end of line, and press Backspace 4 times to remove all stuff. What is called 
"Tk doesn't support astral characters".

Get the text programmically.

>>> text.get('1.0', '1.end')
'ð゚ミᄆ'
>>> print(ascii(text.get('1.0', '1.end')))
'\xf0\uff9f\uff90\uffb1'

On Linux the clipboard uses UTF-8, and this symbol is represented by 4-bytes 
bytestring b'\xf0\x9f\x90\xb1' (that is why Tk sometimes interpret it as 4 
characters). When you request the text content as a Unicode, Tcl fails to 
decode the string from UTF-8 and falls back to Latin1. Due to other bug it 
extends the sign of some bytes. When you programmically insert the same string 
back, it will be encoded to b'\xc3\xb0\xef\xbe\x9f\xef\xbe\x90\xef\xbe\xb1' and 
displayed as 'ð゚ミᄆ'.

On Windows the clipboard uses UTF-16LE and you can see different results.

The underlying graphical system can support astral characters, but Tk fails to 
handle them correctly.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2014-12-09 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
type: crash - behavior
versions: +Python 3.5 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2014-02-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is updated patch (after committing issue20368 which made main 
refactoring). It makes PythonCmd never fail due to arguments decoding error.

--
Added file: http://bugs.python.org/file34016/tkinter_pythoncmd_args_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2014-01-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

As far as the patch becomes too complicated, I propose minimalist patch which 
fixes only this issue. I.e. IDLE will no longer silently closed when paste some 
unusual text (non-BMP on Windows or illegal UTF-8 on Linux). It fixes 
converting Tcl string to Python string for arguments of Python callback. 
\xc0\x80 is translated to the NUL character (U+) because Tcl uses 
modified UTF-8. All other illegal UTF-8 codes are replaced by the replacement 
character (U+FFFD).

--
Added file: http://bugs.python.org/file33318/tkinter_pythoncmd_args.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2014-01-05 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I completely lost track which problem is being solved here. Is it still IDLE 
crashes when pasting non-BMP unicode char on Py3? If so, how is this patch 
solving it?

IMO, the issue shouhldn't have been reopened. Instead, a new issue should have 
started.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2014-01-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, it is still the same issue. The root of issue is in converting strings 
when passed to Python-implemented callbacks. When a text is pasted in IDLE 
window, the callback is called (for highlighting). The callback is a command 
created by Tcl_CreateCommand from PythonCmd. PythonCmd is a wrapper which 
converts arguments (char*) to Python strings and then pass them to Python 
command. Arguments are encoded in modified UTF-8 [1], i.e. the NUL character 
is represented as \xc0\x80, they can contains other invalid UTF-8 sequences 
(such as encoded surrogates). When decoding arguments to Python strings are 
failed, main Tcl loop is broken and IDLE silently closed.

When astral character is pasted on Windows, it first encoded to UTF-16 by 
Windows, then Tcl encodes every 16-bit surrogate to modified UTF-8. The result 
is not valid UTF-8. On X Window systems the X selection value usually is UTF-8 
encoded (the type is UTF8_STRING), but can contains invalid UTF-8 sequences.

I will open separate issue to fix other bugs related to Tcl - Python string 
conversions. The last patch fixes only initial issue which is most important.

[1] http://en.wikipedia.org/wiki/UTF-8#Modified_UTF-8

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-10-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Martin, could you please review this patch? This bug affects not only IDLE, but 
any Tkinter application which uses callbacks with arguments. Encoding/decoding 
error during converting arguments from Tcl to Python causes immediate finishing 
Tcl main loop (and normally closing an application).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-10-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
priority: normal - high

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-10-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
components: +Unicode

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-10-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +loewis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-09-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Previous patch has a regression, it breaks decoding NUL which Tcl encodes in 
modified UTF-8 as \xc0\x80. However this part of code already broken, because 
it handles only singular NUL and not a NUL embedded in larger string.

Here is a patch which also fixes decoding NULs from modified UTF-8.

--
Added file: http://bugs.python.org/file31610/tkinter_string_conv_3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-09-05 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Removed file: http://bugs.python.org/file31185/tkinter_string_conv.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-09-05 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Removed file: http://bugs.python.org/file31592/tkinter_string_conv_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-09-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This bug can be reproduced on Linux too. Just copy and paste illegal UTF-8 
sequence. I.e. b'\xed\xb2\x80' or b'\xc0\x80'. My patch works with first 
example but failed with second. When change the error handler in 
fromTclStringAndSize() to replace it works with all illegal sequences.

--
assignee:  - serhiy.storchaka
stage:  - patch review
Added file: http://bugs.python.org/file31592/tkinter_string_conv_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-08-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

u'\U000104a2' == u'\ud801\udca2' on narrow build.

u'\ud801'.encode('utf-8', 'surrogatepass') == b'\xed\xa0\x81'
u'\udca2'.encode('utf-8', 'surrogatepass') == b'\xed\xb2\xa2'

Hope it will help.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-08-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Seems as Tk stores pasted \U000104a2 as surrogate pair \ud801\udca2. Then 
it encoded in UTF-8 as \xed\xa0\x81\xed\xb2\xa2 end passed to Python. Python 
converts char* to Unicode object with PyUnicode_FromString() which forbids 
invalid UTF-8 including encoded surrogates.

Please test proposed patch on Windows.

--
Added file: http://bugs.python.org/file31184/tkinter_string_conv.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-08-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Removed file: http://bugs.python.org/file31184/tkinter_string_conv.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-08-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Added file: http://bugs.python.org/file31185/tkinter_string_conv.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-08-06 Thread Ezio Melotti

Ezio Melotti added the comment:

0xed is the start byte of a 3 bytes sequence (i.e. a BMP char), and it should 
be followed by two continuation bytes.

For some reason the traceback you pasted is missing the last part, that might 
provide some insight.  It could be one of these:
 b'\xed'.decode('utf-8') # not enough continuation bytes
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 0: 
unexpected end of data
 b'\xed\x7f'.decode('utf-8') # not a valid continuation byte
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 0: invalid 
continuation byte

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-08-06 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Byte 0, not byte 1, is the start byte, and it should be F0, as in output below. 
However, I now see invalid continuation byte'.
In 2.7.5,
# -*- coding: utf-8 -*-
s = b'Ң'  # output same if uncomment following lines
#s = u'Ң'.encode('utf-8')  # 'Ң' pasted in from 1st post
#s = u'\U000104a2'.encode('utf-8')  
print(len(s))
for c in s: print(ord(c), hex(ord(c)))
 
4
(240, '0xf0')
(144, '0x90')
(146, '0x92')
(162, '0xa2')

I have no idea how the second pasted byte becomes ED in 3.x.

Attempting to open the file in 3.x results in a broken* 'Untitled' edit window 
and the following error message in the console.
_tkinter.TclError: character U+104a2 is above the range (U+-U+) allowed 
by Tcl

* Attempting to close the window either immediately or after entering text 
results in
AttributeError: 'PyShellEditorWindow' object has no attribute 'extensions'
I have to close the initial python process to get rid of it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-07-22 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee: serhiy.storchaka - 
stage: committed/rejected - 

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-07-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

In 3.3.2, 3.4.0 the traceback says that the invalid continuation byte 
(immediately, when 'Ң' is pasted) is ED. Snipped version is
  File F:\Python\dev\py33\lib\tkinter\__init__.py, line 1071, 
self.tk.mainloop(n)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 1:

As I understand utf-8 from, for instance, the wikipedia article, continuation 
bytes are 0b10xx, or A0 to BF and definitely not ED.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-07-03 Thread William Schwartz

William Schwartz added the comment:

Looks like this issue is closed, but I got IDLE to crash.

On Python 3.3.2, Windows 7, and Tk version 8.5, IDLE crashes when pasting 
\U0001F382 (Unicode birthday cake character). Below is the version string for 
the Python I'm running.

Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit 
(AMD64)] on win32.

According to http://docs.python.org/3.3/whatsnew/changelog.html this issue was 
fixed in Python 3.3.1 RC 1. Indeed the patch discussed above exists in the 
cpython 3.3 branch: 
http://hg.python.org/cpython/file/910ec3471d55/Modules/_tkinter.c. But IDLE 
still crashes, at least for me.

--
nosy: +William.Schwartz

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-07-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Unfortunately I can't reproduce a crash on Linux. Perhaps this is Windows only 
issue.

--
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-07-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I verified problem continuing problem windows. There is only a 'crash' when 
running under pythonw, which does not happenon linux, as far as I know. When 
running on a console, the error traceback is the same as in msg145581 (with 
line numbers altered). Changing some ValueError to a TclError did not affect 
either UnicodeDecodeError or the problem of error reports crashing Idle because 
there is no stderr to send them to.

This type of crash is a generic problem addressed by #13582. The solution to 
that would solve the crash part of this issue, but not the message. I would 
like to see the 2.x message, possibly improved. Perhaps we should resurrect the 
2.x codec for processing text pasted into the shell.

As for text windows,
# -*- coding: utf-8 -*-
print('Ң')
# ðミメᄁ
which is not good either.

--
resolution: fixed - 
versions:  -Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-02-18 Thread Ned Deily

Ned Deily added the comment:

Serhiy, I think your patch is ready to commit and close this issue as it 
prevents the crash.  A test would be nice if a reliable test could be devised 
without too much effort but it's not mandatory, IMO.  Any tangential issues or 
more complex solutions can be pursued in other issues.

--
stage: test needed - commit review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-02-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bb5a8564e186 by Serhiy Storchaka in branch '2.7':
Issue #13153: Tkinter functions now raise TclError instead of ValueError when
http://hg.python.org/cpython/rev/bb5a8564e186

New changeset 9904f245c3f0 by Serhiy Storchaka in branch '3.2':
Issue #13153: Tkinter functions now raise TclError instead of ValueError when
http://hg.python.org/cpython/rev/9904f245c3f0

New changeset 38bb2a46692e by Serhiy Storchaka in branch '3.3':
Issue #13153: Tkinter functions now raise TclError instead of ValueError when
http://hg.python.org/cpython/rev/38bb2a46692e

New changeset 61993bb9ab0e by Serhiy Storchaka in branch 'default':
Issue #13153: Tkinter functions now raise TclError instead of ValueError when
http://hg.python.org/cpython/rev/61993bb9ab0e

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-02-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee: asvetlov - serhiy.storchaka
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-02-15 Thread Ned Deily

Ned Deily added the comment:

LGTM.  The patch does prevent the crash in IDLE which is certainly an 
improvement until such time as someone investigates having Tk/tkinter fully 
support non-BMP characters.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-02-15 Thread Ramchandra Apte

Ramchandra Apte added the comment:

@Ned Deily
Tk, at least on my system, doesn't render Unicode characters, even within BMP 
correctly but the characters are kept (cut-and-paste works correctly)
What you mean by support.

--
nosy: +Ramchandra.Apte

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-02-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The characters tk can render depends on the font you tell it to use. On my 
Windows IDLE, I have Options Font Face set to Lucida Sans Unicode, though I am 
not sure what has the widest coverage. This page
https://www.microsoft.com/typography/fonts/font.aspx?FMID=1263
only mentions West Asian, but I seem to get more than that.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-02-15 Thread Ezio Melotti

Ezio Melotti added the comment:

The font used shouldn't affect the errors.  Usually if a glyph is missing in 
the current font, either a placeholder (usually a box) is showed instead or the 
missing glyph is taken from another font (if possible).

If you still want to do some tests, you can take a look at 
http://en.wikipedia.org/wiki/List_of_Unicode_fonts#Unicode_fonts

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-02-15 Thread Ned Deily

Ned Deily added the comment:

Also, there are differences in behavior among the various flavors of Tk.  I 
know of at least four main flavors in use by current Python builds:  Unix 
X11-based Tk 8.5, Windows Tk 8.5, OS X Cocoa Tk 8.5, OS X Carbon Tk 8.4.  Some 
third-party distributors are starting to supply Tk 8.6, in its various flavors, 
now that 8.6 has been released. Each flavor has various build options and 
features to fit in with its host o/s environment.  This makes testing tkinter 
issues *interesting*.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-02-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Tkinter is not compatible with Tcl/Tk 8.6 yet (issue16809).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-02-15 Thread Ned Deily

Ned Deily added the comment:

Serhiy, I'm aware of that; regardless, Tk 8.6 is starting to be used out in the 
field with tkinter.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-02-15 Thread Ramchandra Apte

Ramchandra Apte added the comment:

I have set it to Ubuntu, which supports the Unicode characters. Maybe
Tkinter doesn't work properly with all the fonts.

On 16 February 2013 01:57, Terry J. Reedy rep...@bugs.python.org wrote:


 Terry J. Reedy added the comment:

 The characters tk can render depends on the font you tell it to use. On my
 Windows IDLE, I have Options Font Face set to Lucida Sans Unicode, though I
 am not sure what has the widest coverage. This page
 https://www.microsoft.com/typography/fonts/font.aspx?FMID=1263
 only mentions West Asian, but I seem to get more than that.

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue13153
 ___


--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-02-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-01-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2012-12-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

A simplest solution is to raise a TclError instead of ValueError for non-BMP 
characters. This should not break any existing code, because a user code should 
be ready to catch a TclError in any case. Here is a patch.

A more complicated solution is to add ValueError to any catch of TclError. And 
this will fix only IDLE, user programs should fix self every.

Also we can silently encode non-BMP characters for Tcl with UTF-16 (and decode 
a result back). This can cause some subtle errors with shifted indices however.

--
keywords: +patch
nosy: +serhiy.storchaka
versions: +Python 2.7
Added file: http://bugs.python.org/file28376/tkinter_nobmp_error.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2012-12-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Same on 64-bit 3.3. Changed title since 3.3 is no longer '16-bit build'.

--
title: IDLE crashes when pasting non-BMP unicode char on UCS-16 build - IDLE 
crashes when pasting non-BMP unicode char on Py3
versions: +Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com