On 11/12/2010 06:47, Kalle Olavi Niemitalo wrote: > Vincent Danjean <vdanj...@debian.org> writes: > >> For example, I've lots of old text data in latin1. Some of them are on >> non-rewritable media. Being able to see them with >> "LC_CTYPE=fr_FR less toto.txt" is very convenient. > > less does not convert the characters to UTF-8 for display, so you > also need a latin1 terminal for that command, and typing file names > in such a terminal will make them latin1 too, which is not nice. > Alternatively: iconv --from-code=ISO-8859-1 toto.txt | less
What you say is logical but I'm sure I only used "LC_CTYPE=.. less ..." to look at old documents. I just try some experiment to be sure (my terminal is urxvt, with LANG set to fr.FR.UTF-8, no other LC_* variables set). lat.txt contains latin-1 text,and utf.txt contains utf-8 text. Correct display (with ! when I found this strange): cat utf.txt ! cat lat.txt less utf.c LC_CTYPE=fr_FR less utf.c LC_CTYPE=fr_FR less lat.c Incorrect display less lat.c Now, run in a urxvt launched with LC_CTYPE=fr_FR Correct display: cat lat.txt less lat.txt Incorrect display: cat utf.txt less utf.txt LC_CTYPE=fr_FR.UTF-8 less utf.txt LC_CTYPE=fr_FR.UTF-8 less lat.txt >> There are also lots of old web pages written in latin1 that are still >> used (old exercises, ...) Not being able to see them properly on a >> Debian system would be a pain. > > I don't believe you need a latin1 locale for viewing latin1 web > pages. The charset will be available from iconv() in any case, > or browsers may have charset converters built in. Ok. I do not know what will stop to work if legacy locales are removed (ie I do not know what is using locales and what is using other mechanisms) Regards, Vincent -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org