[latex3-commits] [git/LaTeX3-latex3-latex2e] master: Set catcodes of 128-255 to other when processing dostrip files (fc53424)
Frank Mittelbach
frank.mittelbach at latex-project.org
Tue Apr 10 12:28:39 CEST 2018
Repository : https://github.com/latex3/latex2e
On branch : master
Link : https://github.com/latex3/latex2e/commit/fc534242c1d1f20769e1978e0cad7365da15de2b
>---------------------------------------------------------------
commit fc534242c1d1f20769e1978e0cad7365da15de2b
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Tue Apr 10 12:28:39 2018 +0200
Set catcodes of 128-255 to other when processing dostrip files
>---------------------------------------------------------------
fc534242c1d1f20769e1978e0cad7365da15de2b
base/changes.txt | 8 ++++++++
base/docstrip.dtx | 20 ++++++++++++++++----
2 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index e476e3e..ebd7eeb 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -4,6 +4,14 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
=======================================================================
+2018-04-10 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * docstrip.dtx (subsection{Batchfile commands}): Read 8bit input
+ raw to leave high bits in the code to unchanged without utf8
+ handling (issue 34)
+ Without this change a dtx file with 8bit chars in the code need to
+ have \UseRawInputEncoding in the .ins file to work.
+
#########################
# 2018-04-01 PL 2 Release
#########################
diff --git a/base/docstrip.dtx b/base/docstrip.dtx
index cedf3c4..29afc6f 100644
--- a/base/docstrip.dtx
+++ b/base/docstrip.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright 1993-2017
+% Copyright 1993-2018
% The LaTeX3 Project and any individual authors listed elsewhere
% in this file.
%
@@ -29,9 +29,9 @@
\catcode`\{=1
\catcode`\}=2
\def\filename{docstrip.dtx}
-\def\fileversion{2.5e}
-\def\filedate{2014/09/29}
-\def\docdate {2017/03/13}
+\def\fileversion{2.5f}
+\def\filedate{2018/04/10}
+\def\docdate {2018/04/10}
%%
%
%\iffalse
@@ -3034,6 +3034,18 @@ Z
\makeOther\~\makeOther\{\makeOther\}\makeOther\&%
\endlinechar-1\relax
% \end{macrocode}
+% To avoid any UTF-8 handling of characters we set code points
+% 128--255 to other.
+% \changes{2.5f}{2018/04/10}{Read 8bit raw to leave high bits in the
+% code to unchanged without utf8 handling (issue 34)}
+% \begin{macrocode}
+ \@tempcnta=128\relax
+ \loop
+ \catcode\@tempcnta 12\relax
+ \ifnum\@tempcnta <255\relax
+ \advance\@tempcnta\@ne
+ \repeat
+% \end{macrocode}
% Then we start a loop to process the lines in the file one by one.
% \begin{macrocode}
\loop
More information about the latex3-commits
mailing list