From 401c6cacf2cbb7dea1cc8450a0060727ec3b13cc Mon Sep 17 00:00:00 2001
From: mirabilos <t.glaser@tarent.de>
Date: Mon, 20 Feb 2017 00:05:37 +0100
Subject: [PATCH] make compatible with Debian jessie (texlive-latex-base
 2014.20141024-2)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Disclaimer: this embeds some code from Debian sid (2016.20170123-3)
into this package; I hereby disclaim any and all interest in that and
add it merely for users’ convenience, upgrading their utf8.def inline.
---
 unicodedomino.sty | 45 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 44 insertions(+), 1 deletion(-)

diff --git a/unicodedomino.sty b/unicodedomino.sty
index fb678df..8915838 100644
--- a/unicodedomino.sty
+++ b/unicodedomino.sty
@@ -24,7 +24,7 @@
 % encountering characters not set up with newunicodechar.
 
 \NeedsTeXFormat{LaTeX2e}%
-\ProvidesPackage{unicodedomino}[2017/02/19 1.0 Domino for unknown codepoints]%
+\ProvidesPackage{unicodedomino}[2017/02/19 1.1 Domino for unknown codepoints]%
 \makeatletter%
 
 \ifx\numexpr\@undefined%
@@ -46,6 +46,49 @@
  \expandafter\UTFviii@hexnumber\expandafter{#1}%
 }%
 
+% missing in utf8.def 2014/09/29 v1.1m (Debian jessie)
+\ifx\decode@UTFviii\@undefined%
+ \PackageWarning{unicodedomino}{Consider updating utf8.def}%
+ % taken from utf8.def 2016/02/28 v1.1s (Debian sid), no claims on this code
+ \gdef\decode@UTFviii#1\relax{%
+  \expandafter\UTFviii@cleanup\the\numexpr\dec@de@UTFviii#1\relax)))))\@empty%
+ }%
+ \gdef\UTFviii@cleanup#1)#2\@empty{#1}%
+ \gdef\dec@de@UTFviii#1{%
+  \ifx\relax#1%
+  \else
+   \ifnum`#1>"EF
+    ((((`#1-"F0)%
+   \else
+    \ifnum`#1>"DF
+      (((`#1-"E0)%
+    \else
+     \ifnum`#1>"BF
+      ((`#1-"C0)%
+     \else
+      \ifnum`#1>"7F
+       )*64+(`#1-"80)%
+      \else
+       +`#1 %
+      \fi
+     \fi
+    \fi
+   \fi
+   \expandafter\dec@de@UTFviii
+  \fi%
+ }%
+ \gdef\UTFviii@hexnumber#1{%
+  \ifnum#1>15 %
+   \expandafter\UTFviii@hexnumber\expandafter{\the\numexpr(#1-8)/16\relax}%
+  \fi%
+  \UTFviii@hexdigit{\numexpr#1\ifnum#1>0-((#1-8)/16)*16\fi\relax}%
+ }%
+ \gdef\UTFviii@hexdigit#1{\ifcase\numexpr#1\relax%
+  0\or1\or2\or3\or4\or5\or6\or7\or8\or9\or A\or B\or C\or D\or E\or F\fi%
+ }%
+ % end of utf8.def inline update
+\fi%
+
 % override to beautify the output, not strictly necessary but requested
 \gdef\UTFviii@splitcsname#1:#2\relax{%
  #2 (\expandafter\unicodedomino@codepoint\expandafter{%
-- 
GitLab