|
From: Ethan M. <merritt@u.washington.edu> - 2005-05-25 16:27:42
|
On Wednesday 25 May 2005 12:27 am, Petr Mikulik wrote: > Consequently, I propose that gnuplot always reads .Xdefaults resources in > C-locale. I fail to understand the problem. It's your .Xdefaults file - you can put anything you like in it. Why limit gnuplot by telling it to ingore the user's choice of environment? > PS: I came to this issue because on my system there is by default > LANG=cs_CZ.UTF-8 > but I run Midnight Commander as > LANG=en_US.UTF-8 mc_lastdir > so that its menus are always in English. That's not funny if hotkeys change. Aha. So I think the underlying issue is that you are using obsolete syntax for setting the locale. For a long time now the locale settings have been split into separate components, and the LANG variable is used only as a backward-compatibility fall-back. I think what you want is unsetenv LANG setenv LC_CTYPE cs_CZ.UTF-8,en_US.UTF-8 setenv LC_MESSAGES en_US.UTF-8 setenv LC_NUMERIC C Individual programs may be buggy, of course, but if they are correctly calling setlocale() then this should result in using CZ character encodings if available (with fall-back to en_US), menus and other system messages in English, and C-language formats for numbers. You can also set LC_TIME to choose a prefered time/date format. > Gnuplot behaves differently if I run it from plain Konsole or from mc, > i.e. its .Xdefault resources are not portable. It should be consistent if you set LC_NUMERIC. If you find out otherwise, then that definitely is a bug, and we should try to fix it. I am not an expert on setting locales. I had to figure this all out the hard way, after installing my current generation of machines to support ja_JP.UTF-8. I assure you it's at least as disconcerting to have your menus pop up in Japanese as it is to have them appear in Czech. But dual-language support works nicely once you have the various locale settings sorted out. I love the current versions of Mandrake (now Mandriva), where the KDE desktop can be installed with SCIM multi-language support. This is really great because you can change the effective locale for individual programs (while they are running!) with a hot keys or a menu command. (caveat: the programs have to be build with appropriate X-input support, but that is true for the ones in the Mandriva distro). -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |