[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Standalone 'info' should recode into display's encoding
From: |
Paul Eggert |
Subject: |
Standalone 'info' should recode into display's encoding |
Date: |
Mon, 30 Dec 2013 20:20:31 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
If I have an info file containing '@documentencoding UTF-8',
makeinfo generates an Info file encoded in UTF-8. But then if
I attempt to read the file using the standalone 'info' reader
in (say) the 'en_US.iso885915' locale, 'info' misbehaves and
puts funny characters onto the display.
This is a problem with GNU Emacs, which ships .info files as
part of its distribution. In the latest stable version of
Emacs (24.3), for example, gnus.texi contains this:
@samp{»} is translated into @samp{>>}, and so on.
where '»' is the UTF-8 character. makeinfo 5.2 converts this to:
‘»’ is translated into ‘>>’, and so on.
where '»' is still the UTF-8 character and there are
UTF-8 curly single-quotes; so far, so good.
But when I run the standalone 'info' command in the
en_US.iso885915 locale, I see this on the screen:
â»â is translated into â>>â, and so on.
because 'info' merely sends the bytes of the UTF-8 representation
to the screen.
I'd rather see something like this:
'»' is translated into '>>', and so on.
where this '»' is the unibyte ISO-8859-15 character '\273',
and the UTF-8 curly single-quotes are transliterated to
ASCII apostrophes.
For my preferred platforms (GNU/Linux based), this is not much
of a problem, since I rarely use unibyte locales. But when the
topic of formatting manuals containing UTF-8 came up on the
Emacs bug list, a Microsoft Windows user objected that the
manual would look bad on his screen, I suppose because he
uses a unibyte locale. For more details please see Emacs bug#16292 at:
http://bugs.gnu.org/16292
- Standalone 'info' should recode into display's encoding,
Paul Eggert <=