Bug 177051

Summary: Superpicky bug: Bash man page shows the wrong quoting character when in UTF-8
Product: Red Hat Enterprise Linux 4 Reporter: David Tonhofer <bughunt>
Component: bashAssignee: Tim Waugh <twaugh>
Status: CLOSED UPSTREAM QA Contact: Ben Levenson <benl>
Severity: low Docs Contact:
Priority: medium    
Version: 4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-01-06 16:45:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Tonhofer 2006-01-05 19:36:10 UTC
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.
http://www.unicode.org/charts/PDF/U0000.pdf

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):


How reproducible:
Always

Steps to Reproduce:
See above

  

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

Additional info:

I have standard "man" configuration

Comment 1 Tim Waugh 2006-01-06 11:00:20 UTC
Solution is to use "\(aq".

Comment 2 Tim Waugh 2006-01-06 16:45:47 UTC
Patch sent upstream.