Skip to content

Commit

Permalink
Gh730 (#731)
Browse files Browse the repository at this point in the history
* update for issue #730

* eol

* use ^^ to make test more visible
  • Loading branch information
davidcarlisle committed Dec 13, 2021
1 parent 67969f4 commit 3c033f6
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 5 deletions.
4 changes: 4 additions & 0 deletions base/changes.txt
Expand Up @@ -6,6 +6,10 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================

2021-12-13 David Carlisle <David.Carlisle@latex-project.org>

* utf8ienc.dtx: Use hex 80 not A0 to test for single byte UTF-8 github/730

2021-12-12 Frank Mittelbach <Frank.Mittelbach@latex-project.org>

* doc.dtx (subsection[Dealing with the change history]):
Expand Down
7 changes: 5 additions & 2 deletions base/doc/ltnews35.tex
Expand Up @@ -282,9 +282,12 @@ \subsection{Croatian character support}

\section{Bug fixes}

\subsection{???}
\subsection{Using \cs{DeclareUnicodeCharacter} with C1 control points}
An error in the UTF-8 handling for non-Unicode \TeX, has prevented
\cs{DeclareUnicodeCharacter} being used with characters in the range
hex 80 to 9F, this has been corrected in this release.
%
\githubissue{???}
\githubissue{730}



Expand Down
12 changes: 12 additions & 0 deletions base/testfiles-legacy/github-0730.lvt
@@ -0,0 +1,12 @@
\documentclass{article}

\input{test2e}
\DeclareUnicodeCharacter{009C}{\fbox{U+009C}}


\begin{document}

\START
% This should show the fbox (and not error)
\setbox0\hbox{U+009C:^^c2^^9c}\showbox0
\END
33 changes: 33 additions & 0 deletions base/testfiles-legacy/github-0730.tlg
@@ -0,0 +1,33 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
> \box...=
\hbox(10.2333+4.23332)x84.57796
.\OT1/cmr/m/n/10 U
.\OT1/cmr/m/n/10 +
.\OT1/cmr/m/n/10 0
.\OT1/cmr/m/n/10 0
.\OT1/cmr/m/n/10 9
.\OT1/cmr/m/n/10 C
.\OT1/cmr/m/n/10 :
.\hbox(10.2333+4.23332)x44.30008
..\hbox(14.46663+0.0)x44.30008, shifted 4.23332
...\vbox(14.46663+0.0)x44.30008
....\rule(0.4+0.0)x*
....\hbox(13.66664+0.0)x44.30008
.....\rule(*+*)x0.4
.....\vbox(13.66664+0.0)x43.50009
......\glue 3.0
......\hbox(6.83331+0.83333)x43.50009
.......\kern 3.0
.......\OT1/cmr/m/n/10 U
.......\OT1/cmr/m/n/10 +
.......\OT1/cmr/m/n/10 0
.......\OT1/cmr/m/n/10 0
.......\OT1/cmr/m/n/10 9
.......\OT1/cmr/m/n/10 C
.......\kern 3.0
......\glue 3.0
.....\rule(*+*)x0.4
....\rule(0.4+0.0)x*
! OK.
l. ...\setbox0\hbox{U+009C:^^c2^^9c}\showbox0
7 changes: 4 additions & 3 deletions base/utf8ienc.dtx
Expand Up @@ -216,7 +216,7 @@
%<+ts1> \ProvidesFile{ts1enc.dfu}
%<+x2> \ProvidesFile{x2enc.dfu}
%<+all> \ProvidesFile{utf8enc.dfu}
%<-utf8-2018> [2021/12/10 v1.2n UTF-8 support]
%<-utf8-2018> [2021/12/13 v1.2o UTF-8 support]
% \end{macrocode}
%
% \begin{macrocode}
Expand Down Expand Up @@ -773,12 +773,13 @@
% looks slightly strange but is designed for the sequence of |\expandafter|
% in |\DeclareUnicodeCharacter|.
%
% \changes{v1.2o}{2021/12/13}{Use 80 not A0 to test for single byte UTF-8}
% \begin{macrocode}
\ifnum\count@<"A0\relax
\ifnum\count@<"80\relax
\ifnum\catcode\count@=13
\uccode`\~=\count@\uppercase{\def\UTFviii@tmp{\@empty\@empty~}}%
\else
\@latex@error{Cannot define non-active Unicode char value < 00A0}%
\@latex@error{Cannot define non-active Unicode char value < 0080}%
\@eha
\def\UTFviii@tmp{\UTFviii@tmp}%
\fi
Expand Down

0 comments on commit 3c033f6

Please sign in to comment.