[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: simplifying configuration of encoded characters/entities output
From: |
Patrice Dumas |
Subject: |
Re: simplifying configuration of encoded characters/entities output |
Date: |
Wed, 29 Dec 2021 18:40:34 +0100 |
On Wed, Dec 29, 2021 at 03:36:23PM +0000, Gavin Smith wrote:
> > I will reproduce here what I said in that thread, I think that doing
> > what Alan want would imply:
> > * added quotes as ASCII
> > * dashes and quotes appearing in the document ``, ---, ' as ASCII
> > * some brace_no_arg_commands @-commands as ASCII, those that are not
> > in the 7bit ascii range and correspond to punctuation, maybe along
> > @minus, @dots, @enddots, @quotedblleft, @quotedblright,
> > @quoteleft, @quoteright. Maybe also, but I am not sure,
> > @quotedblbase, @quotesinglbase.
> >
> > I think that your change does the first two, but no_extra_unicode does
> > not corresponds to the third point. I am pretty sure that it prevents
> > any conversion of @-commands like @l{} to unicode/utf8.
>
>
> I checked and it didn't. @l{} did output with the correct character
> with
>
> ./texi2any.pl -c NO_UTF8_PUNCTUATION=1 ../doc/texinfo.texi
>
> It works by checking %Texinfo::Convert::Unicode::extra_unicode_map
> which is the list of exclusions.
Ok, I completely missed that part. So, I suggest switching quotedblleft,
quotedblright, quoteleft and quoteright from unicode_map to extra_unicode_map.
I will also commit something to make that part of the code hopefully clearer,
in particular by referring to
$Texinfo::Encoding::eight_bit_encoding_aliases{$encoding}
and also such that the point 2 of Alan, 'dashes and quotes appearing in
the document ``, ---, ' as ASCII' is implemented.
Also I think that instead of 'extra_utf8' it could be
'full_coverage_encoding_extra_unicode'
and similarly NO_UTF8_PUNCTUATION could be
FULL_COVERAGE_ENCODING_ASCII_PUNCTUATION.
(But this is a bit long...).
--
Pat
Re: simplifying configuration of encoded characters/entities output, Gavin Smith, 2021/12/29