bug-texinfo
[Top][All Lists]
Advanced

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

XeTeX encoding problem (was Re: luatex problems with texinfo.tex)


From: Masamichi Hosoda
Subject: XeTeX encoding problem (was Re: luatex problems with texinfo.tex)
Date: Wed, 06 Jan 2016 21:52:24 +0900 (JST)

>>>> Here's a file that I ran with pdftex and with luatex: both worked.
>>>> If this looks right, the code can be moved into texinfo.tex.
>> 
>> \ifx\XeTeXrevision\thisisundefined
>> \else
>> \XeTeXinputencoding "bytes"
>> \fi
>> 
>> although I haven't been able to test this.
> 
> I've tried the attached file.
> Both pdfTeX and XeTeX, it works fine in my environment.
> Thank you.

XeTeX encoding support of texinfo.tex ver. 2016-01-04.21 does not function.
The following texi file fails.

```
\input texinfo.tex

@documentencoding UTF-8

† ‡ § ¶

@bye
```

\XeTeXinputencoding is effective only within the file in which it is put.
In the case of texinfo.tex ver. 2016-01-04.21,
\XeTeXinputencoding is effective only within texinfo.tex itself.

I've made a patch that solve the problem.
Would you merge it?
--- texinfo.tex.org     2016-01-05 22:26:04.245558200 +0900
+++ texinfo.tex 2016-01-06 21:34:34.563743800 +0900
@@ -9432,7 +9432,8 @@
 % otherwise the encoding support is completely broken.
 \ifx\XeTeXrevision\thisisundefined
 \else
-\XeTeXinputencoding "bytes"
+\XeTeXdefaultencoding "bytes"  % For subsequent files to be read
+\XeTeXinputencoding "bytes"  % Effective in texinfo.tex only
 \fi
 
 \ifx\luatexversion\thisisundefined
@@ -9477,6 +9478,13 @@
 %
 \def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz}
 \def\documentencodingzzz#1{%
+  % Get input by bytes instead of by UTF-8 codepoints for XeTeX, 
+  % otherwise the encoding support is completely broken.
+  % This settings is for the document root file.
+  \ifx\XeTeXrevision\thisisundefined
+  \else
+    \XeTeXinputencoding "bytes"
+  \fi
   % Encoding being declared for the document.
   \def\declaredencoding{\csname #1.enc\endcsname}%
   %

reply via email to

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