X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.5 required=5.0 tests=AWL,BAYES_00,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_RW,TW_WX X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Oleksandr Gavenko Subject: Man and LANG issue. Date: Thu, 20 Oct 2011 11:42:12 +0300 Lines: 64 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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