Red Hat Bugzilla – Bug 177051
Superpicky bug: Bash man page shows the wrong quoting character when in UTF-8
Last modified: 2007-11-30 17:07:22 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Description of problem:
Bash man page says:
Words of the form $âstringâ are treated specially. The word expands to string, with backslash-escaped characters replaced as specifed by the ANSI C
standard. Backslash escape sequences, if present, are decoded as follows:
If the shell uses UTF-8, then the character displayed (â) is 0xe28099
(try echo "$âsâ" | hexdump), which, being UTF-8, resolves to codepoint
0x2019 "1110(0010) 10(000000) 10(011001)" = "0010000000011001"
which is 'right single quotation mark' according to http://www.unicode.org/charts/PDF/U2000.pdf
This does not *necessarily look* (at least not in default Putty) like the character that should be shown, which is 'apostrophe', 0x27.
Raw man page shows the apostrophe, so on second thoughs it is probably 'nroff' that goes overboard:
Words of the form \fB$\fP'\fIstring\fP' are treated specially. The
word expands to \fIstring\fP, with backslash-escaped characters replaced
as specifed by the ANSI C standard. Backslash escape sequences, if
present, are decoded as follows:
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Actual Results: Bad character shown, making me go into trial-and-error mode
Expected Results: Correct character shown, making me proceed with the shell script
I have standard "man" configuration
Solution is to use "\(aq".
Patch sent upstream.