On Sat, Dec 06, 2008 at 06:58:47PM +0100, Josip Rodin wrote:
> > It get's even more confusing. I've tried a few terminal clients and
> > settings.
> > 
> > My default locale is as follows:
> > 
> > LANG=de_DE.UTF-8
> > 
> > First I tried with the older version (joe 3.5-1.1), where the output is
> > as follows, with the above locale:
> > 
> > joe MYFILE
> > unertrXgliche GebrXll der VXgel.
> > 
> > joe -guess_non_utf8 MYFILE
> > unerträgliche Gebrüll der Vögel.
> > 
> > LC_ALL=ISO-8859-1 joe MYFILE
> > unertr???gliche Gebr???ll der V???gel.
> >
> > LC_ALL=ISO-8859-1 joe -guess_non_utf8 MYFILE
> > unertr???gliche Gebr???ll der V???gel.

I don't think that setting LC_ALL=ISO-8859-1 makes sense, it should be
LC_ALL=de_DE.ISO-8859-1 instead.

You probably got three bytes there per each accented character there because
this locale was unknown to the terminal/font -- three bytes is excessive in
any case because UTF-8 would output have been two bytes.

> > I've just copied & pasted all those outputs verbatim from xterm here.
> > Everything appeared the same in the real Linux console, and in xterm.

You'd have to tell us which font is your xterm using. For example
'-misc-fixed-*-*-*-*-20-*-*-*-*-*-iso10646-1' or something like that.

> 3.7 will be uploaded shortly, please try it when you see it. I can't
> reproduce your terminal exactly because I don't have UTF-8 support at the
> moment, but I'll tend to it eventually if you don't beat me to it.

I tried to test this with joe 3.7 now. I created a file test.latin1.txt with
this sentence of yours containing Latin 1 umlauts. I also patched joe so
that it shows both the locale_map and locale_map_non_utf8 variables in the
status line (the second one is the guessed one).

Then I started: xterm -fn '-misc-fixed-*-*-*-*-20-*-*-*-*-*-iso10646-1'
In the new shell, I set LANG=hr_HR.UTF-8

In this terminal/shell, I ran four things:
* joe test.latin1.txt compiled without my HAVE_SETLOCALE patch
* joe -guess_non_utf8 test.latin1.txt compiled without my HAVE_SETLOCALE patch
* joe test.latin1.txt compiled *with* my HAVE_SETLOCALE patch
* joe -guess_non_utf8 test.latin1.txt compiled *with* my HAVE_SETLOCALE patch

Each and every time, the status line said that the main locale map is utf-8,
and the guessed locale map is iso-8859-2. That means that joe detected
the non-UTF-8 character set for the file properly regardless of the patch.
(Latin2 instead of Latin1 is fine in this case because the non-UTF8 hr_HR
is like that.)

If you could upgrade to joe 3.7 and verify that this is what happens for you
too, that would be great.

Aside from that, you might have font issues with various terminals...

-- 
     2. That which causes joy or happiness.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to