* Man and LANG issue.
@ 2011-10-20 8:42 Oleksandr Gavenko
2011-10-20 8:56 ` Markus Hoenicka
0 siblings, 1 reply; 3+ messages in thread
From: Oleksandr Gavenko @ 2011-10-20 8:42 UTC (permalink / raw)
To: cygwin
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Man and LANG issue.
2011-10-20 8:42 Man and LANG issue Oleksandr Gavenko
@ 2011-10-20 8:56 ` Markus Hoenicka
2011-10-20 11:50 ` Oleksandr Gavenko
0 siblings, 1 reply; 3+ messages in thread
From: Markus Hoenicka @ 2011-10-20 8:56 UTC (permalink / raw)
To: cygwin
Oleksandr Gavenko <gavenko@bifit.com.ua> was heard to say:
>
> But how about Emacs M-x man? I need write a wrapper and set
>
Dunno about the rest, but have you tried M-x woman? This is a man page
reader implemented in elisp. It may or may not handle language issues
better than man.
regards,
Markus
--
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Man and LANG issue.
2011-10-20 8:56 ` Markus Hoenicka
@ 2011-10-20 11:50 ` Oleksandr Gavenko
0 siblings, 0 replies; 3+ messages in thread
From: Oleksandr Gavenko @ 2011-10-20 11:50 UTC (permalink / raw)
To: cygwin
20.10.2011 11:56, Markus Hoenicka пиÑеÑ:
> Oleksandr Gavenko <gavenko@bifit.com.ua> was heard to say:
>
>>
>> But how about Emacs M-x man? I need write a wrapper and set
>>
>
> Dunno about the rest, but have you tried M-x woman? This is a man page
> reader implemented in elisp. It may or may not handle language issues
> better than man.
>
Yes, I use M-x woman for a long time with Cygwin 1.5 when native Emacs
can not correctly invoke Cygwin man...
But some day with Cygwin 1.7 I discover that M-x man properly work so
stop using M-x woman (because of initial load delay to build index of
available man pages).
A few day ago I post my config how to get this:
http://article.gmane.org/gmane.os.cygwin/129043
# This allow access to man files from Cygwin and native Emacs
# (with cygwin-mount.el enabled), M-x man/woman...
# Take special attention to leading colon.
MANPATH=:/cygdrive/e/home/usr/share/man:/usr/share/man:/usr/local/share/man
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-20 11:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-20 8:42 Man and LANG issue Oleksandr Gavenko
2011-10-20 8:56 ` Markus Hoenicka
2011-10-20 11:50 ` Oleksandr Gavenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).