classification
Title: unable to input certain Unicode characters in Text widget
Type: Stage: resolved
Components: Tkinter Versions: Python 3.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: nobodxbodon, terry.reedy
Priority: normal Keywords:

Created on 2020-10-22 20:54 by nobodxbodon, last changed 2020-10-24 00:55 by terry.reedy. This issue is now closed.

Messages (2)
msg379345 - (view) Author: Xuan Wu (nobodxbodon) Date: 2020-10-22 20:54
When creating a text editor with tkinter Text widget, I found that some Chinese punctuations cound't be input correctly.

When input "(", which is open parenthesis in Chinese, it behaves like a back space.
When input ")", close parenthesis in Chinese, it seems like a tab instead.
When input ";", semicolon in Chinese, it does nothing.

Then I tried input the same in IDLE 3.7.6 and the same happened. Also, the same happens in thonny, the python IDE. I suppose they all use Text widget.

Pitifully I don't think of a way to reproduce the issue without using Chinese input method.

Please let me know how to help with debugging. Thanks.
msg379505 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-10-24 00:55
I am closing this because I am rather sure that your problem is with your input method and its interaction with your OS and the tcl/tk GUI framework.  Tkinter has essentially nothing to do with key and mouse input.

A better place to ask for debugging help is https://mail.python.org/mailman/listinfo/python-list.  If you post there, include your OS.

For testing tkinter, you should input with keys, using the unicode escaped codes: '\u####' for BMP chars, and '\U000#####' for non-BMP chars, where each # is a hexadecimal character.

For using tkinter, you should use a recent release, within the last year, as tkinter's handling of non-ASCII chars are improved a year ago.   The fix may be in the 3.7.9 release.

If your browser supports unicode as well as, say, Firefox does, (which is better than Tkinter) your input method should work with it.

BPO is for developing patches to fix and enhance the Python docs and the CPython implementation.  You have not yet given evidence that there is bug in *current* CPython.  If you do, we can reopen.
History
Date User Action Args
2020-10-24 00:55:39terry.reedysetstatus: open -> closed

nosy: + terry.reedy
messages: + msg379505

resolution: not a bug
stage: resolved
2020-10-22 20:54:54nobodxbodoncreate