Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 313801 - xterm: locale problems
Summary: xterm: locale problems
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-08 08:48 UTC by Tolga Dalman
Modified: 2011-01-02 20:55 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
appres XTerm (appres.XTerm,4.77 KB, text/plain)
2010-04-14 21:37 UTC, Tolga Dalman
Details
env output (env,4.08 KB, text/plain)
2010-04-14 21:38 UTC, Tolga Dalman
Details
locale (locale,341 bytes, text/plain)
2010-04-14 21:39 UTC, Tolga Dalman
Details
emerge --info outpu (emerge.info,3.89 KB, text/plain)
2010-04-14 21:39 UTC, Tolga Dalman
Details
debugging trace from xterm, for the "xterm -lc" case (Trace-parent.out-cmd,45.33 KB, text/plain)
2010-04-17 14:58 UTC, Thomas Dickey
Details
debugging trace from xterm for the xrdb case (Trace-parent.out-xrdb,45.48 KB, text/plain)
2010-04-17 14:59 UTC, Thomas Dickey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tolga Dalman 2010-04-08 08:48:49 UTC
Calling xterm -lc gives correct encoded terminal, while the entry
"XTerm*locale: true" does not.

Reproducible: Always

Steps to Reproduce:
1. edit ~/.Xdefaults
2. add "XTerm*locale: true"
3. xrdb -remove; xrdb -merge ~/.Xdefaults
4. start xterm

Actual Results:  
Xterms displays broken glyphs

Expected Results:  
utf8 glyphs should be displayed properly, such as umlauts and cyrillic chars.

This is probably a usage problem. Nevertheless, I found no dokumentation to do it
correctly.
Comment 1 Thomas Dickey 2010-04-12 00:15:06 UTC
It seems to work here.  Perhaps there was some other xrdb
setting which you're relying upon which was deleted with
the "xrdb -remove".
Comment 2 Tolga Dalman 2010-04-12 16:16:30 UTC
I use no other xrdb resource. My xterm should display the glyphs correctly after reboot, which it does not.
Comment 3 Thomas Dickey 2010-04-12 20:50:17 UTC
The output from

   appres XTerm
   env
   locale

would be helpful in reconstructing your setup.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2010-04-14 20:02:20 UTC
please reopen with info requested by Comment #3 and emerge --info too.
Comment 5 Tolga Dalman 2010-04-14 21:37:47 UTC
Created attachment 227805 [details]
appres XTerm
Comment 6 Tolga Dalman 2010-04-14 21:38:28 UTC
Created attachment 227807 [details]
env output
Comment 7 Tolga Dalman 2010-04-14 21:39:08 UTC
Created attachment 227809 [details]
locale
Comment 8 Tolga Dalman 2010-04-14 21:39:57 UTC
Created attachment 227811 [details]
emerge --info outpu
Comment 9 Tolga Dalman 2010-04-14 21:50:07 UTC
I also tried uxterm, but it didn't help.
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2010-04-14 22:00:06 UTC
reopen
Comment 11 Thomas Dickey 2010-04-15 09:53:30 UTC
thanks (will study this and see)
Comment 12 Thomas Dickey 2010-04-17 14:57:57 UTC
I still don't see it (on Debian/testing - I don't have GenToo).
The two different ways of setting the value should be equivalent.

On my setup, one sets "on" and the other sets "true".
The value is tested in charproc.c, e.g.,

        if (x_strcasecmp(xw->misc.locale_str, "TRUE") == 0 ||
            x_strcasecmp(xw->misc.locale_str, "ON") == 0 ||
            x_strcasecmp(xw->misc.locale_str, "YES") == 0 ||
            x_strcasecmp(xw->misc.locale_str, "AUTO") == 0 ||
            strcmp(xw->misc.locale_str, "1") == 0) {
        /* when true ... fully obeying LC_CTYPE locale */
        xw->misc.callfilter = (Boolean) (is_utf8 ? 0 : 1);
        screen->utf8_mode = uAlways;

I configured/compiled xterm using --enable-trace, and see that the
two give the same result (will attach traces).
Comment 13 Thomas Dickey 2010-04-17 14:58:48 UTC
Created attachment 228159 [details]
debugging trace from xterm, for the "xterm -lc" case
Comment 14 Thomas Dickey 2010-04-17 14:59:12 UTC
Created attachment 228161 [details]
debugging trace from xterm for the xrdb case
Comment 15 Thomas Dickey 2010-04-17 15:03:41 UTC
The place to examine is around line 430 of each trace.
That's where the locale_str value is seen, tested and used.

I also checked that (for my system) that the glyphs render
for values past 255.

However, if your configuration does not have the ISO10646 fonts, then
xterm may fallback to the "fixed" font, which lacks the glyphs.  I see
that the ebuild here

http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-terms/xterm/xterm-256.ebuild?view=markup

does mention media-fonts/font-misc-misc; however I'm uncertain whether
that package contains the needed fonts.
Comment 16 Tolga Dalman 2010-04-18 15:46:10 UTC
What really confuses me is the fact, that I get it running properly calling 'xterm -lc'. Could this possibly be a bug in Gnome ?
Comment 17 Thomas Dickey 2010-04-18 15:57:38 UTC
I'm not sure.  If you can configure xterm with the extra
(--enable-trace) option, you can see the corresponding trace.
If xterm is indeed getting the data from xrdb, that part of
the trace would be the same, as I see in my own traces.

But if xterm is not getting the data from xrdb, I don't
know of a bug that would prevent this from working.
Comment 18 Samuli Suominen (RETIRED) gentoo-dev 2010-09-10 17:45:57 UTC
(In reply to comment #17)
> I'm not sure.  If you can configure xterm with the extra
> (--enable-trace) option, you can see the corresponding trace.

To the original reporter:

You can do this easily by: 

EXTRA_ECONF="--enable-trace" emerge xterm