> I have a bug report assigned to myself which indicates similar > problems with _tkinter and Tk/Tcl. There were other problem > reports on the German Python mailing list going in the same > direction too. > > The basic problem seems to be that Tk/Tcl applies too much > magic to the text widget contents in order to find out the > used encoding and this can easily cause the whole encoding > mechanism to fail. This is actually a different problem. In this scenario here, the user types non-ASCII character into a text widget, then _tkinter returns a Unicode object (IMO rightfully so). In the other problem, the Python program puts a byte string into a text widget, the user enters some more characters, and _tkinter returns a byte string which does not follow any encoding. > A Tk/Tcl expert should really look into this and fix _tkinter.c > to aid Tk/Tcl in not mixing up the encodings (e.g. it would > probably be a good idea to recode Python 8bit-strings into > whatever encoding Tk/Tcl assumes as default). Again, this is not the issue here: Both _tkinter and Tk behave absolutely correct IMO. The question is how IDLE should deal with it. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4