On 26 December 2015 at 11:49, Eli Zaretskii <[email protected]> wrote:
>> Date: Sat, 26 Dec 2015 11:01:15 +0000
>> From: Gavin Smith <[email protected]>
>> Cc: Per Bothner <[email protected]>, Texinfo <[email protected]>
>>
>> On 26 December 2015 at 10:58, Eli Zaretskii <[email protected]> wrote:
>> >> If the duplication of the encoding information is a problem, maybe the
>> >> Emacs mode for Texinfo could recognize a "@documentencoding" command.
>> >
>> > But @documentencoding doesn't necessarily mean the file is in that
>> > encoding, does it?
>>
>> I thought it did? That's what the manual seems to say:
>>
>> "The '@documentencoding' command declares the input document encoding,
>> and can also affect the encoding of the output."
>
> A plain-ASCII document could produce a UTF-8 encoded Info manual, no?

This is subtle. It's true that a plain ASCII document is encoded in
UTF-8 (because ASCII is a subset of UTF-8), but the effect of a
"@documentencoding UTF-8" directive in such a case wouldn't be on the
interpretation of the input, but on the output for Info and HTML.

XML and Docbook output always uses UTF-8, and DVI or PDF output
doesn't have an encoding. I wouldn't see anything wrong with an option
being added to texi2any to specify the output encoding for Info or
HTML in spite of any @documentencoding command. It's even possible
that the default encoding of the output could change in the future:
for example, if @documentencoding is in some strange encoding, and the
user is using a UTF-8 locale, it would be likely better for the output
encoding to be UTF-8.

Reply via email to