Summary: The package siunitx (version < 2.4e) was found giving errors ("Invalid code 84XX") on unit declarations when using a particular input encoding (latin-1), while still compiling the tex code properly. The problem was encountered with version 2.4d and version 2.4c of siunitx with a latin1 encoded source file, declaring the encoding by a \usepackage[latin1]{inputenc} command.
The problem could be solved by updating siunitx to version 2.4e or higher (thanks to the package maintainer Joseph Wright).
Two other useful workarounds are:
*) Changing the file encoding to supported utf-8 (e.g., by a 'Save As...' command in a visual editor, specifying the new encoding; or with a 'iconv --from-code OLD_ENCODING --to-code NEW_ENCODING source.tex > source.newencoding.tex' on a linux box), and replacing the latin1 parameter in the inputenc command with utf8.
*) Use of the selinput package, as shown in the example by localghost:
Thank goes to localghost for both workarounds.localghost wrote: For a European language like Italian you can try a semiautomatic input encoding by the selinput package from the oberdiek bundle instead of a fixed one. It will select the right input encoding according to the file encoding by several glyphs. Replace the above line with the following.The needed glyphs can be found in the Adobe Glyph List.Code: Select all
\usepackage{selinput} \SelectInputMappings{% agrave={à}, eacute={é}, Euro={€} }
I'll mark this thread as solved.
%%%%%%%%%%%%%%%%%%%% Original post from 10 Dec 2011 %%%%%%%%%%%%%%%%%%%%
Hello altogether,
first of all I want to express my gratitude to the people who run this forum and those who contribute. I cleared many problems just by searching (sometimes a bit more intensely

Here's my actual problem. I've not found anyone else referring to it, so it could be related to my own system.
A working example which reproduces the error on my system is the following:
Code: Select all
\documentclass{minimal}
\usepackage[latin1]{inputenc}
\usepackage{siunitx}
\begin{document}
trial text to check \emph{siunitx}'s behavior: \si{m} \\
\si{\metre} \\
\num{e5} \\
\SI{5}{s} \\
\SI{5}{\second}\par
accented letters I need in Italian: À È Ì Ò Ù É à è ì ò ù é
and in German: Ä Ö Ü ä ö ü ß
\end{document}
(I didn't insert the
Code: Select all
\usepackage[T1]{fontenc}
The typical error I get when compiling is something like this:
Code: Select all
! Invalid code (8451), should be in the range 0..255.
<recently read> \int_eval_end:
l.8 \SI{5}{s}
\\
I am running a complete TeX Live distribution, updated weekly or so (last update: 10 Dec 2011), on a Kubuntu 11.04 box. Usually I write my source code with Kate (actually 3.6.5); writing it with Vim didn't change anything.
The error appeared first about two weeks ago, upgrading siunitx; then it appeared on all unit declarations (literal and macros). Since the last upgrade it happens just on literal declarations.
I tried to do compiling in nonstopmode, but I found myself overlooking important errors more than once, so I'm looking for another solution.
Has anybody an idea about something I did do wrong, or some setting to be checked/changed on my box?
With best regards,
Xem