Subject: Re: bug#7577: non-ascii char in manpage

From: Eric Blake <[email-masked]>
Date: Tue, 07 Dec 2010 08:15:22 -0700

On 12/07/2010 02:30 AM, [email-masked] wrote:
>  Hi there,
> 
> reading through the man page for date,  I found this two that look like a typo, (â) I guess I could be wrong, but:
>  %x    localeâs date representation (e.g., 12/31/99)
>  %X     localeâs time representation (e.g., 23:13:48)

Thanks for the report.  This is not a bug in coreutils, per se.  Rather,
it is probably an issue that help2man (which is how we generate man
pages automatically from 'date --help' output) is outputting a raw ASCII
' (rather than using roff markup for an apostrophe that renders better
according to locale, or even the roff markup for an explicit \x27 byte
regardless of locale).  Then, you couple that with some versions of man
that try to display unescaped ' in man sources as a nicer
charset-specific ’ (here's hoping your email program renders that
decently), but in such a manner that it used a different charset
encoding than what your current terminal supports, resulting in the
wrong glyph being displayed.

I don't know if there's anything coreutils could do to address this.
You might want to raise a bug report with help2man to see if that
program can do a better job of converting ` and ' into appropriate roff
escapes (whether for literal ASCII bytes, or for stylized
locale-specific angled single quotes - it may require some hefty
heuristics to get right, when translating from simple --help output).
Or, you might file a bug report against your distro's version of man for
being "too" smart and transliterating raw apostrophes into the wrong
charset rather than passing them through unchanged.

-- 
Eric Blake   [email-masked]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org