Description of problem: User with non-default locale can't type any non latin1 symbols in all tk applications, such tkbiff or tkabber. Version-Release number of selected component (if applicable): tk-8.5.1 How reproducible: Steps to Reproduce: 1. exec LC_ALL=ru_RU.utf8 2. try to input any nonlatin1 text (Russian Cyrillic text, for example) Actual results: nothing Expected results: Russian Cyrillic text ;) Additional info: Another toolkits, such gtk or qt will work with locale ru_RU.utf8. With default locale en_US.UTF-8 or locale ru_RU.UTF-8 tk work fine. Workaround - create file ~/.i18n
Created attachment 305707 [details] Right ~/.i18n config for users, that uses russian locale
Steps to Reproduce: 1. exec LC_ALL=ru_RU.utf8 tkdiff 2. try to input any nonlatin1 text (Russian Cyrillic text, for example)
Another steps to reproduce 1) LC_ALL=ru_RU.utf8 wish % encoding system utf-8 % pack [text .t] -fill both 2) try to type no latin text in text widget (not in console!)
I have the same problem with Czech fonts (also not in latin-1). I try to update on tcl&tk-8.5.2 and then check it again.
Ok, it's not working with 8.5.2, here is upstream ticket http://sourceforge.net/tracker/index.php?func=detail&aid=1967075&group_id=12997&atid=112997
>Workaround: >create file ~/.i18n with your locales. Does it mean that wish isn't looking >for locales into shell settings? It is not correct information. LC_ALL=ru_RU.utf8 <TK-Program> is not work. but LC_ALL=ru_RU.UTF-8 <TK-Program> work fine Diffrence in this cases - "UTF-8" or "utf8" charset. As you can see, tcl works fine in both case: LC_ALL=ru_RU.utf8 wish % encoding system utf-8 LC_ALL=ru_RU.UTF-8 wish % encoding system utf-8 But in TK widgets only utf8 charset not work for input text!
Upstream says nothing will be fixed. It has to be used "ru_RU.UTF-8". Upstream comment: @flatworm -- re "Gtk and Qt are immune to this problem" -- Tk uses the low-level XIM facilities built in to libX11. Gtk and Qt both have their own, independent, toolkit-specific, plugin-based IM infrastructures. So Gtk (resp Qt) processes keyboard input via a completely different mechanism than Tk does. (If you set GTK_IM_MODULE=xim resp QT_IM_MODULE=xim, you should see the same symptoms with Gtk resp Qt apps as you do with Tk apps. Otherwise, Gtk resp Qt will use whatever IM module is the default for your platform/distro/locale/environment/time of day/phase of moon.) Anyway, given this: | ./a.out: locale=ru_RU.utf8 | ./a.out: codeset=UTF-8 | ./a.out: WARNING: X does not support locale ru_RU.utf8 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ and this: | ./a.out: locale=ru_RU.UTF-8 | ./a.out: codeset=UTF-8 | ./a.out: XSupportsLocale => True it looks like the solution is to use "ru_RU.UTF-8" as the locale, not "ru_RU.utf8".