diff --git a/unicodedomino_kernel_better_decode.def b/unicodedomino_kernel_better_decode.def index fb52a221e68758364192ed98c639b3929081a218..b8a132f3ca65e71311656e0bf6f7e944b845ad74 100644 --- a/unicodedomino_kernel_better_decode.def +++ b/unicodedomino_kernel_better_decode.def @@ -4,9 +4,9 @@ % this file is dual-licenced under the LPPL version 1.3c or later. %- % Fix check for illegal sequences to fail overlong encoded sequences -% as well as codepoints outside of the Unicode range [0;10FFFF]. Use -% fixed-up check code to improve Unicode decoding. This is the enti†-% rety of PR https://github.com/latex3/latex2e/pull/83 (rejected). +% as well as codepoints outside of the UCS range [0;10FFFF]; improve +% UTF-8 decoding with fixed-up check code and a safer UTF-8 decoder. +% This is https://github.com/latex3/latex2e/pull/83 (rejected). % new check for illegal sequences \gdef\UTFviii@checkseq#1:#2#3\empty{% @@ -20,27 +20,27 @@ 1% \else% \ifnum`#2<"E0 % - % one 80-BF + % one "80‥"BF \UTFviii@check@one#3\empty% \else% \ifnum`#2<"E1 % - % A0-BF + one 80-BF + % "A0‥"BF + one "80‥"BF \UTFviii@check@two"A0.#3\empty% \else% \ifnum`#2<"F0 % - % two 80-BF + % two "80‥"BF \UTFviii@check@two"80.#3\empty% \else% \ifnum`#2<"F1 % - % 90-BF + two 80-BF + % "90‥"BF + two "80‥"BF \UTFviii@check@three"90."BF.#3\empty% \else% \ifnum`#2<"F4 % - % three 80-BF + % three "80‥"BF \UTFviii@check@three"80."BF.#3\empty% \else% \ifnum`#2<"F5 % - % 80-8F + two 80-BF + % "80‥"8F + two "80‥"BF \UTFviii@check@three"80."8F.#3\empty% \else% 1% @@ -54,7 +54,7 @@ \fi% }% -% check last trail octet in the range "80.."BF +% check last trail octet in the range "80‥"BF \gdef\UTFviii@check@one#1#2\empty{% \ifx\empty#2\empty% \ifnum`#1<"80 % @@ -69,7 +69,7 @@ \fi% }% -% check second-to-last trail octet in the range #1.."BF +% check second-to-last trail octet in the range #1‥"BF \gdef\UTFviii@check@two#1.#2#3\empty{% \ifx\empty#3\empty% 1% @@ -86,7 +86,7 @@ \fi% }% -% check third-to-last trail octet in the range #1..#2 +% check third-to-last trail octet in the range #1‥#2 \gdef\UTFviii@check@three#1.#2.#3#4\empty{% \ifx\empty#4\empty% 1% @@ -135,7 +135,7 @@ % decode lead octet \gdef\UTFviii@dec@lead#1:#2#3\relax{% - % we know #2 is in 00..7F, C2..F4 + % we know #2 is in "00‥"7F, "C2‥"F4 \ifnum`#2<"80 % `#2% \else% diff --git a/unicodedomino_kernel_cosmetics.def b/unicodedomino_kernel_cosmetics.def index ee2a96f1b5a6e4e2050f9261951a52b680ec1089..41a9e6da464d77def6039d3cc57402ab3baa3255 100644 --- a/unicodedomino_kernel_cosmetics.def +++ b/unicodedomino_kernel_cosmetics.def @@ -14,7 +14,7 @@ }% \fi% -% override to format a hex Unicode codepoint correctly +% override to format a UCS codepoint (hexadecimal notation) correctly \gdef\UTFviii@hexcodepoint#1{% \ifnum#1<16 U+000% \else\ifnum#1<256 U+00% diff --git a/unicodedomino_kernel_fixup_f4.def b/unicodedomino_kernel_fixup_f4.def index 3d90addca3790160aa66d5456bbc7287a5b4e2e6..afad014b5796961f1bffefc80a3901b7c6b557ac 100644 --- a/unicodedomino_kernel_fixup_f4.def +++ b/unicodedomino_kernel_fixup_f4.def @@ -3,15 +3,15 @@ % See unicodedomino.sty for copyright and licence terms. Furthermore % this file is dual-licenced under the LPPL version 1.3c or later. %- -% Disallow codepoints outside of the Unicode range [0;10FFFF]; allow -% "F4 as lead octet. Fixed upstream v1.2e 2018/09/28 +% Disallow codepoints outside of the UCS range [0;10FFFF]; allow "F4 +% as lead octet. Fixed upstream v1.2e 2018/09/28 % bugfix: disallow too large definitions \let\unicodedomino@parse@XML@charref\parse@XML@charref% \gdef\parse@XML@charref{% \ifnum\count@>"10FFFF\relax% \PackageError{inputenc}{% - Cannot define Unicode char value\space% + Cannot define UCS codepoint\space% \UTFviii@hexnumber\count@\space% (too large)% }%