# Incompatibility of packages ucs, CJKutf8, siunitx

I am using pdftex to write a book that mixes mathematics, Chinese and transliterated Arabic. The following setup

\documentclass{article}
\usepackage{ucs}
\usepackage{CJKutf8}
\usepackage{siunitx}
\begin{document}
\inputencoding{utf8x}
\inputencoding{utf8}

\begin{CJK*}{UTF8}{gkai}

\end{CJK*}
\end{document}


works fine with TeXLive 2017, but it give a weird error under TeXLive 2018 and 2019:

(/usr/local/texlive/2019/texmf-dist/tex/latex/base/ts1enc.dfu
/usr/local/texlive/2019/texmf-dist/tex/latex/base/ts1enc.dfu:115: Missing numbe
r, treated as zero.
<to be read again>
F
l.115 ...icodeCharacter{FEFF}{\ifhmode\nobreak\fi}

?


Unfortunately such characters as Ḫ and ḥ force me to use utf8x.

I can still manage with TeXLive 2017, but perhaps the unicode experts can track down the problem.

• A very warm welcome to TeX.SX! – egreg Jul 5 '19 at 15:32
• You probably know this, but: if you can switch from PDFLaTeX to LuaLaTeX or XeLaTeX, you can use Unicode and system fonts natively. – Davislor Jul 5 '19 at 22:37

You don't have to use ucs/utf8x, you can add the missing declarations yourself. Depending on the number of declarations it can mean a bit work, but at the end you will have something that is not incompatible with standard latex:

\documentclass{article}

\usepackage{CJKutf8}
\usepackage{siunitx}
\DeclareUnicodeCharacter{1E25}{\d{h}}
\begin{document}