[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new command @U{nnnn}?

From: Karl Berry
Subject: new command @U{nnnn}?
Date: Tue, 4 Nov 2014 17:37:50 GMT

Patrice and all,

I had the thought that maybe we should invent a new command @U{nnnn},
which would output the U+NNNN character (as well as possible).  The main
points would be (a) to provide a way to output the occasional random
glyph without us having to make up a new @command{}, and (b) not having
to use actual binary bytes (e.g., UTF-8) in the Texinfo input file.

At least one little test using &#xNNNN; in an iso-8859-1 document
worked.  (I was also testing literal Latin1 characters at the same time,
which seemingly worked fine too.)  See attached Texinfo + XML created
with makeinfo --xml and then hand-edited for the left arrow glyph
U+2190.  (I just renamed it to latin1.html to view it.)

Anyway, so HTML, XML, and Docbook should be easy (just output &#x, and
if it doesn't work, not our problem).  For TeX, I also wouldn't go to
any extraordinary lengths; should be possible to handle whatever can be
handled now via direct input.

The question is Info and plain text (when NNNN > 7f).  I'm not sure if
the Perl libraries you're already using give us anything useful in this
regard.  Going to great lengths to analyze whether the NNNN is part of
the @documentencoding does not seem warranted.  Creating a new command
to separate the (input) @documentencoding from the output encoding (and
then forcing the output to UTF-8), though perhaps useful for other
reasons, seems like a tremendous effort, essentially reimplementing
iconv, etc.  I conjecture that it would be ok to output UTF-8 if no
@documentencoding is given, and otherwise just output some string, e.g.,
the literal ascii characters "U+NNNN".  Plenty of other behaviors are
possible too, of course.

Wdyt?  Is it a worthwhile idea at all?


Attachment: latin1.tex
Description: Binary data

Attachment: latin1.xml
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]