This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Man and LANG issue.
- From: Oleksandr Gavenko <gavenko at bifit dot com dot ua>
- To: cygwin at cygwin dot com
- Date: Thu, 20 Oct 2011 11:42:12 +0300
- Subject: Man and LANG issue.
My LANG=ru_RU.cp1251 so if man page was translated I get garbage
in output.
Problem lies out of 'cp1251' because /usr/share/man/ru store
man pages in different encoding:
/usr/share/man/ru/man1/mc.1.gz is UTF-8
/usr/share/man/ru/man1/mplayer.1.gz is koi8-r
Also man does not support page recoding on fly:
$ ls -ld /usr/share/man/ru*
drwxr-xr-x+ 1 user root 0 ÐÑÐ 10 2010 /usr/share/man/ru
drwxr-xr-x+ 1 user root 0 ÐÐÑ 13 10:10 /usr/share/man/ru.KOI8-R
drwxr-xr-x+ 1 user root 0 ÐÐÑ 13 10:10 /usr/share/man/ru.UTF-8
$ test -f /usr/share/man/ru.KOI8-R/ex.1.gz && OK
OK
$ LANG=ru_RU.cp1251 man ex
... EN output ...
$ LANG=ru_RU.UTF-8 man ex
... EN output ...
$ LANG=ru.UTF-8-8 man ex
... !!RU output!! ...
so man can not strip '_RU' from 'ru_RU'!
I would like to see only EN man pages. According to 'man 1 man' I
need set 'LANG=C', but I like 'LANG=ru_RU.cp1251'!
I try add:
LANG C
to /etc/man.conf, but got warning:
Unrecognized line in config file (ignored)
LANG C
In bash I can define alias:
$ alias man='LANG=C man'
But how about Emacs M-x man? I need write a wrapper and set
(setq manual-program "LANG=C man")
In order to fix page lang for MC and bash I put
alias man='LANG=C man'
to ~/.bashrc
Seems I cover all my use cases but I have a questions:
* Is it possible set LANG setting for man without setting LANG=C to
all other apps (like Emacs, MC)? I would like see option in
'man.conf'
* Is it right provide /usr/share/man/ru/ with files with different
encoding? I think packages must fixed to 'ru.UTF-8', ru.KOI8-R
path.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple