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

check for correct encoding

inspired by upstream change between TL 2016 and 2018
parent 40f02ca3
No related branches found
No related tags found
No related merge requests found
...@@ -196,20 +196,26 @@ ...@@ -196,20 +196,26 @@
% main handler % main handler
\def\UTFviii@defined#1{% \def\UTFviii@defined#1{%
\ifx#1\relax% \ifx#1\relax%
% unknown char \if\relax\expandafter\UTFviii@checkseq\string#1\relax\relax%
\ifx\protect\@typeset@protect% % unknown char
% not protected \ifx\protect\@typeset@protect%
\PackageWarning{inputenc}{% % not protected
Unicode\space char\space\expandafter\UTFviii@splitcsname\string#1\relax% \PackageWarning{inputenc}{%
\space not\space set\space up\space for\space use\MessageBreak with\space% Unicode\space char\space\expandafter\UTFviii@splitcsname\string#1\relax%
LaTeX, replacing% \space not\space set\space up\space for\space use\MessageBreak with\space%
}% LaTeX, replacing%
% note: same warning as in \UTFviii@undefined@err in utf8.def v1.2c, }%
% except adding “, replacing” at the end and not being an error % note: same warning as in \UTFviii@undefined@err in utf8.def v1.2c,
\expandafter\unicodedomino@decode\string#1\relax% % except adding “, replacing” at the end and not being an error
\expandafter\unicodedomino@decode\string#1\relax%
\else%
% protected, just write the original character
\expandafter\@gobblefour\string#1%
\fi%
\else% \else%
% protected, just write the original character % invalid encoding
\expandafter\@gobblefour\string#1% \PackageError{inputenc}{Invalid UTF-8 byte sequence}%
{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