Bug 517447 - man pages display strange â characters instead of quotes
Summary: man pages display strange â characters instead of quotes
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: groff
Version: 5.3
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Jan Vcelak
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-14 03:57 UTC by Scott Rochford
Modified: 2013-03-04 01:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-04-21 10:49:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Scott Rochford 2009-08-14 03:57:19 UTC
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.

Comment 1 Scott Rochford 2009-08-14 03:59:10 UTC
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.

Comment 2 Scott Rochford 2009-08-17 02:15:33 UTC
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.

Comment 3 Ivana Varekova 2009-08-17 07:13:52 UTC
Please what version of man-pages package do you have?

Comment 4 Ivana Varekova 2009-08-17 07:42:55 UTC
Can you please attach here the output of command printenv

Comment 5 Scott Rochford 2009-08-17 23:20:12 UTC
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 ~]#

Comment 6 Ivana Varekova 2010-04-14 08:57:36 UTC
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

Comment 7 Scott Rochford 2010-04-15 01:05:56 UTC
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â

Comment 8 Ivana Varekova 2010-04-20 08:04:16 UTC
this seems for me to be groff problem.
Honzo could you look at it.

Comment 9 Jan Vcelak 2010-04-20 10:51:36 UTC
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?

Comment 10 Scott Rochford 2010-04-21 06:37:58 UTC
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.

Comment 11 Jan Vcelak 2010-04-21 10:49:46 UTC
It's OK. You are very welcome. I'm closing this bug.


Note You need to log in before you can comment on or make changes to this bug.