Description of problem: man pages incorrectly display opening ` and closing ' quotes as â characters. A good example is the --color section on 'man ls'. Version-Release number of selected component (if applicable): man-1.6d-1.1 groff-1.18.1.1-11.1 coreutils-5.97-19.el5 less-394-5.el5 # locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= How reproducible: 100% Steps to Reproduce: 1. man ls Actual results: --color[=WHEN] control whether color is used to distinguish file types. WHEN may be âneverâ, âalwaysâ, or âautoâ Expected results: --color[=WHEN] control whether color is used to distinguish file types. WHEN may be `never', `always', or `auto' Additional info: One workaround is suggested here, I'm not sure whether or not it is the best solution: http://www.walkernews.net/2007/09/26/how-to-fix-weird-character-in-linux-man-page/ Apologies if this is a duplicate, it was difficult to identify suitable search terms for the bugzilla search.
https://bugzilla.redhat.com/show_bug.cgi?id=177051 is a similar bug that I beileve was fixed by modifying the individual man page itself, but the problem is endemic.
This problem appears to be specific to the UTF-8 character map. Using LC_ALL=C or LC_ALL=en_US.iso88591 also works around the problem.
Please what version of man-pages package do you have?
Can you please attach here the output of command printenv
man package versions and locale settings are included in the original bug report. printenv output is as follows: [root@obedt102 ~]# printenv HOSTNAME=something SHELL=/bin/bash TERM=xterm HISTSIZE=1000 USER=root LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35: MAIL=/var/spool/mail/root PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/VRTS/bin:/opt/VRTSvcs/bin:/root/bin INPUTRC=/etc/inputrc PWD=/root LANG=en_US.UTF-8 SHLVL=1 HOME=/root LOGNAME=root LESSOPEN=|/usr/bin/lesspipe.sh %s G_BROKEN_FILENAMES=1 _=/usr/bin/printenv [root@something ~]#
Can you please test whether the problem happens if you use the command: (echo ".ll 14.1i"; echo ".nr LL 14.1i"; echo ".pl 1100i"; /usr/bin/gunzip -c '/usr/share/man/man1/ls.1.gz'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -c -mandoc 2>/dev/null
Yes, I still get the following output: --color[=WHEN] control whether color is used to distinguish file types. WHEN may be âneverâ, âalwaysâ, or âautoâ
this seems for me to be groff problem. Honzo could you look at it.
Hello Scott. Your environment is configured to use UTF-8 encoding (according to LC_ALL and LANG). Therefore groff produces UTF-8 output. And in that case, regular quotes are replaced by Unicode quotes (\xe2\x80\x98 and \xe2\x80\x99). I suppose that your terminal uses ISO-8859-1 and that's why you see the quotes wrong. Of course, changing LC_ALL to ISO or C helps. In this configuration quotes are regular quotes (\x27). The solution is to set up both your environment and terminal to use the same encoding. Am I right?
You're absolutely right; I didn't even realise I had the choice in my terminal emulator (PuTTY in this case) until you pointed that out, and assumed that it should be able to handle UTF-8. Apologies for the Red Herring, and thanks for the tip! I think this one can be closed.
It's OK. You are very welcome. I'm closing this bug.