[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#318923: xterm: localization hell again (even with UTF8 locales)



On Tue, Jul 19, 2005 at 01:18:45PM +0300, Wladimir Mutel wrote:
> 
> 	Very strange 'locale' printout above. Perhaps you should run
> 	'with-locale' with first parameter 'uk_UA.UTF-8', not the entire
> 	assignment 'LANG=uk_UA.UTF-8'. Btw, your 'date' prints English
> 	date, not Cyrillic/Ukrainian. And you see these
> 	'locale: Cannot set ...' diagnostics, which is not too good.
> 
> > testit:
> > #!/bin/sh
> > with-locale LANG=uk_UA.UTF-8 locale
> > with-locale LANG=uk_UA.UTF-8 date

oops - I see what you are saying (very long day).  The script should have
said

    #!/bin/sh
    with-locale uk_UA.UTF-8 locale
    with-locale uk_UA.UTF-8 date

When I do that, I do get the (un)expected result (the date rendered as n's).

Looking for a different way of seeing things, I find that xfd can display
TrueType fonts (in a limited way - no size changes).  If I run

	xfd -fa Terminus

It shows me a single page (0 to 255).  Doing

	xfd -fa FreeMono

shows several pages, populated with glyphs.  Looking for the files that
represent xfonts-terminus, I see only some bitmap fonts.

However, as you report, I can tell gvim to load "Terminus" font and display
the date in uk_UA.UTF-8 locale.

Here is another clue: I can see by the access times which font is actually
being loaded.  For whatever reason, both xterm and xfd are causing Xft
to load the 8859-1 version of the font rather than the unicode version.
Here's a cut-paste from my directory editor showing the access times:

crayon:/                                                        4 of 191 [atime]
96 Tue 18:00:06   etc/fonts/conf.d/
54 Tue 18:00:06   etc/fonts/conf.d/50-enable-terminus.conf
02 Tue 18:00:06   usr/X11R6/lib/X11/fonts/misc/ter-u12n_iso-8859-1.pcf.gz
25 Tue 17:58:35   usr/X11R6/lib/X11/fonts/misc/ter-u14b_iso-8859-1.pcf.gz
32 Tue 17:58:35   usr/X11R6/lib/X11/fonts/misc/ter-u14n_iso-8859-1.pcf.gz
70 Tue 17:58:09   usr/X11R6/lib/X11/fonts/misc/ter-u16b_unicode.pcf.gz
97 Tue 17:58:08   usr/X11R6/lib/X11/fonts/misc/ter-u16n_unicode.pcf.gz
25 Tue 17:52:50   usr/share/doc/xfonts-terminus/README.Debian
51 Tue 17:52:20   etc/X11/fonts/misc/xfonts-terminus.alias

The "u12n" is loaded by xfd (running in uk_UA.UTF-8 locale).
The "u14b" files were loaded by "uxterm -fa Terminus"
The "u16n" files were loaded by gvim (running in uk_UA.UTF-8 locale).

The 8859-1 fonts of course are 8-bit, and the codes that you are attempting
to display are not.

So it does not appear to be a problem with the font-files themselves,
but perhaps the font server (perhaps requiring some new or modified
information).  I see that /usr/bin/X11/xfs is dated June 1.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Attachment: pgpgOkYyyapdZ.pgp
Description: PGP signature


Reply to: