Hi to list. Best wishes for the new Year. I have the following problem: I am using 9.2 with UTF-8. The problem is that when i try to view a file written in ISO-8859-7 under konsole (say via cat or less), i just see round squares (cat) or some numbers (less). Same things happen when i slogin to a Solaris 9 machine with LANG=el (defaults to 8859-7 to Solaris). Ok i understand this because the encodings are different but this really messes up my work... I sent emails via pine so u understand that the 8859-7 characters are displayed as complete trash. The funny thing is that Solaris 9 says that supports UTF-8 but thats not full (it cant cope with many Greek letters). So is there any way under my SuSE 9.2 KDE konsole to see my 8859-7 characters while working both locally and remotely (of course still using the UTF-8 encoding)? Thanks.
On Mon, Jan 03, 2005 at 04:52:33PM +0200, Filippos Papadopoulos wrote:
Hi to list. Best wishes for the new Year.
I have the following problem: I am using 9.2 with UTF-8. The problem is that when i try to view a file written in ISO-8859-7 under konsole (say via cat or less), i just see round squares (cat) or some numbers (less). Same things happen when i slogin to a Solaris 9 machine with LANG=el (defaults to 8859-7 to Solaris).
Ok i understand this because the encodings are different but this really messes up my work... I sent emails via pine so u understand that the 8859-7 characters are displayed as complete trash. The funny thing is that Solaris 9 says that supports UTF-8 but thats not full (it cant cope with many Greek letters).
So is there any way under my SuSE 9.2 KDE konsole to see my 8859-7 characters while working both locally and remotely (of course still using the UTF-8 encoding)?
Yes, use luit (from xorg-x11.rpm). For example, when I ssh from my 9.2 box which uses cs_CZ.UTF-8 to a different one which uses 8859-2, I say LC_ALL=cs_CZ luit ssh martin@foo.mff.cuni.cz To make a konsole session, wrap it in sh -c "..." I also have a little script for it: mvidner@valkyrie:~$ cat ~/bin/l2 #! /bin/sh LANG=cs_CZ luit "$@" -- Martin Vidner, developer SuSE CR, s.r.o. e-mail: mvidner@suse.cz Drahobejlova 27 tel:+420-296542373 190 00 Praha 9, Czech Republic http://www.suse.cz
Filippos Papadopoulos
I have the following problem: I am using 9.2 with UTF-8. The problem is that when i try to view a file written in ISO-8859-7 under konsole (say via cat or less), i just see round squares (cat) or some numbers (less).
To view ISO-8859-7 encoded files while running in UTF-8 you can use iconv -f ISO-8895-7 -t UTF-8 < file | less iconv -f ISO-8895-7 -t UTF-8 < file | cat I usually use 'lv' instead of 'less' for that purpose because one needs to type less: lv -Il7 -Ou8 file
Same things happen when i slogin to a Solaris 9 machine with LANG=el (defaults to 8859-7 to Solaris).
When logging in to the solaris machine, use $ LC_ALL=el_GR.ISO-8859-7 luit ssh solaris-machine see also 'man luit'.
Ok i understand this because the encodings are different but this really messes up my work... I sent emails via pine so u understand that the 8859-7 characters are displayed as complete trash.
Are you using the UTF-8 support in Pine? See
http://www.suse.de/~bk/pine/FAQ.html
The pine in SuSE 9.2 contains the patches by Bernhard Kaindl
and Jungshik Shin but maybe your setup is not correct?
--
Mike FABIAN
On Mon, 3 Jan 2005, Mike FABIAN wrote:
Filippos Papadopoulos
����Ͻޤ���: I have the following problem: I am using 9.2 with UTF-8. The problem is that when i try to view a file written in ISO-8859-7 under konsole (say via cat or less), i just see round squares (cat) or some numbers (less).
To view ISO-8859-7 encoded files while running in UTF-8 you can use
iconv -f ISO-8895-7 -t UTF-8 < file | less iconv -f ISO-8895-7 -t UTF-8 < file | cat
I usually use 'lv' instead of 'less' for that purpose because one needs to type less:
lv -Il7 -Ou8 file
Ok this works now . thanks !
Same things happen when i slogin to a Solaris 9 machine with LANG=el (defaults to 8859-7 to Solaris).
When logging in to the solaris machine, use
$ LC_ALL=el_GR.ISO-8859-7 luit ssh solaris-machine
see also 'man luit'.
This works too!
Ok i understand this because the encodings are different but this really messes up my work... I sent emails via pine so u understand that the 8859-7 characters are displayed as complete trash.
Are you using the UTF-8 support in Pine? See
http://www.suse.de/~bk/pine/FAQ.html
The pine in SuSE 9.2 contains the patches by Bernhard Kaindl and Jungshik Shin but maybe your setup is not correct?
I am using pine in Solaris not in SuSE. I am trying to build now the patched version in Solaris. Though, with luit all my problems have solved. Using the unpatched version of Pine 4.61 for Solaris9 i can see both Utf-8 and 8859-7 emails in pine and i can reply with the correct encoding to them, thanks to luit! I just type Greek in Konsole (while being ssh'ed to solaris box) and everything seems to work nice. Is there any benefit to use the patched PINE version in Solaris now ? BTW i lookes at etc/sysconfig file through YaST editor and there is an option for Automatically detect UTF-8. Has that anything to do with LUIT ? OT (just a philosophical question) Why all these conversions from UTF-8 to ISO-* and via versa dont happen automatically? Is this feasible?
Filippos Papadopoulos
BTW i lookes at etc/sysconfig file through YaST editor and there is an option for Automatically detect UTF-8. Has that anything to do with LUIT ?
No.
This option was introduced for the following case:
You are using a terminal on a legacy system which does not support
UTF-8, for example your Solaris system or an old SuSE Linux system.
Now you log into SuSE Linux 9.2 which sets an UTF-8 locale by default.
This will not work well in the legacy terminal. So you have to do
set a legacy locale like
export LANG=el_GR
manually in your legacy terminal to get make it work correctly.
But if you have AUTO_DETECT_UTF8="yes", the SuSE 9.2 tries to detect
whether the terminal used for login supports UTF-8 or not and if it
doesn't support UTF-8 it automatically tries to set an appropriate
legacy locale for you. This is a bit of guesswork and may not always
work.
I don't really like that hack and don't recommend to use it.
Especially because of the following annoying problem:
You log in with a terminal which *does* support UTF-8. The auto
detection works by printing a German ö (o-Umlaut) in UTF-8 on the
terminal, then checking the cursor position and then removing the ö
(o-Umlaut) again. If your connection is slow (Modem or DSL), you can
actually see the ö appearing and disappearing again.
If you are in a hurry and continue typing while this auto detection is
running, the auto detection fails and thinks you terminal does not
support UTF-8 although it does.
So if you use this auto detection, stop typing for a second after
logging in using a slow connection.
--
Mike FABIAN
Filippos Papadopoulos
OT (just a philosophical question) Why all these conversions from UTF-8 to ISO-* and via versa dont happen automatically? Is this feasible?
Many of the legacy encodings cannot be detected with 100% accuracy
automatically. I.e. you cannot easily find out whether a text is
ISO-8859-1 or ISO-8859-2 for example.
--
Mike FABIAN
participants (3)
-
Filippos Papadopoulos
-
Martin Vidner
-
Mike FABIAN