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

show _which_ byte string is wrong, in hex

parent 37314689
No related branches found
No related tags found
No related merge requests found
...@@ -120,6 +120,15 @@ ...@@ -120,6 +120,15 @@
\the\numexpr\decode@UTFviii#2\relax})% \the\numexpr\decode@UTFviii#2\relax})%
}% }%
% for invalid encoding output
\gdef\unicodedomino@splith@x#1#2\relax{%
\space 0x\UTFviii@hexnumber{`#1}%
\ifx\relax#2\relax\else\unicodedomino@splith@x#2\relax\fi%
}%
\gdef\unicodedomino@splithex#1:#2\relax{%
\unicodedomino@splith@x#2\relax%
}%
% render the actual domino piece % render the actual domino piece
\def\unicodedomino@box#1#2{% \def\unicodedomino@box#1#2{%
\begingroup% \begingroup%
...@@ -214,8 +223,10 @@ ...@@ -214,8 +223,10 @@
\fi% \fi%
\else% \else%
% invalid encoding % invalid encoding
\PackageError{inputenc}{Invalid UTF-8 byte sequence}% \PackageError{inputenc}{%
{Do ensure the source document is saved in UTF-8 encoding.}% Invalid\space UTF-8\space byte\space sequence:%
\expandafter\unicodedomino@splithex\string#1\relax%
}{Do ensure the source document is saved in UTF-8 encoding.}%
\fi% \fi%
\else% \else%
% known char, expand % known char, expand
......
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