Skip to content
Snippets Groups Projects
Verified Commit 27ea9a67 authored by mirabilos's avatar mirabilos Committed by mirabilos
Browse files

rearrange so the unconditional overrides are in a conditional block

matching how these have been fed back upstream; David Carlisle
said it’ll be merged in, up to, a few weeks
parent ec65ae31
No related branches found
No related tags found
No related merge requests found
...@@ -20,20 +20,26 @@ ...@@ -20,20 +20,26 @@
% %
% This file is dual-licenced under the LPPL version 1.3c or later. % This file is dual-licenced under the LPPL version 1.3c or later.
%- %-
% Improve error and warning formatting. % Improve error and warning formatting. Fully submitted upstream.
%: https://github.com/latex3/latex2e/pull/62 %: https://github.com/latex3/latex2e/pull/62
% format a number as two-digit hex
\ifx\UTFviii@hexbyte\@undefined% \ifx\UTFviii@hexbyte\@undefined%
% format a number as two-digit hex
\def\UTFviii@hexbyte#1{% \def\UTFviii@hexbyte#1{%
\ifnum#1<16 0\fi% \ifnum#1<16 0\fi%
\UTFviii@hexnumber{#1}% \UTFviii@hexnumber{#1}%
}% }%
% override message to give the byte in hex
\def\UTFviii@invalid@err#1{%
\PackageError{inputenc}{Invalid UTF-8 byte "\UTFviii@hexbyte{`#1}}%
\UTFviii@invalid@help%
}%
\fi% \fi%
%: https://github.com/latex3/latex2e/pull/63 %: https://github.com/latex3/latex2e/pull/63
% format a number as Unicode codepoint hex
\ifx\UTFviii@hexcodepoint\@undefined% \ifx\UTFviii@hexcodepoint\@undefined%
% format a number as Unicode codepoint hex
\def\UTFviii@hexcodepoint#1{% \def\UTFviii@hexcodepoint#1{%
\ifnum#1<16 U+000% \ifnum#1<16 U+000%
\else\ifnum#1<256 U+00% \else\ifnum#1<256 U+00%
...@@ -44,6 +50,12 @@ ...@@ -44,6 +50,12 @@
\fi\fi\fi\fi\fi% \fi\fi\fi\fi\fi%
\UTFviii@hexnumber{#1}% \UTFviii@hexnumber{#1}%
}% }%
% override message to format the codepoint correctly
\gdef\UTFviii@splitcsname#1:#2\relax{%
#2 (\expandafter\UTFviii@hexcodepoint\expandafter{%
\the\numexpr\decode@UTFviii#2\relax})%
}%
\fi% \fi%
%: https://github.com/latex3/latex2e/pull/62 %: https://github.com/latex3/latex2e/pull/62
...@@ -59,17 +71,3 @@ ...@@ -59,17 +71,3 @@
\ifx\relax#2\relax\else\UTFviii@hexseq#2\relax\fi% \ifx\relax#2\relax\else\UTFviii@hexseq#2\relax\fi%
}% }%
\fi% \fi%
%: https://github.com/latex3/latex2e/pull/62
% override message to give the byte in hex
\def\UTFviii@invalid@err#1{%
\PackageError{inputenc}{Invalid UTF-8 byte "\UTFviii@hexbyte{`#1}}%
\UTFviii@invalid@help%
}%
%: https://github.com/latex3/latex2e/pull/63
% override message to format the codepoint correctly
\gdef\UTFviii@splitcsname#1:#2\relax{%
#2 (\expandafter\UTFviii@hexcodepoint\expandafter{%
\the\numexpr\decode@UTFviii#2\relax})%
}%
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment