[Tex/LaTex] clefval.sty: ! Package inputenc Error: Invalid UTF-8 byte “A0

errorsunicode

After upgrading to TeX Live 2020, one of our beamer presentations is chucking this error up.

I've been trying to track down where the invalid byte comes from and I've narrowed it down to a macro in our (custom) beamer style. However the file contains no non-ascii characters (and thus no invalid utf-8 chars).

The presentation file itself does contain some non-ascii accented characters, but deleting them doesn't make the error go away.

This leaves me confused. I'm not even sure how to interpret the error message. What is a "A0 byte? Is that 0xa0? Does the double quote have some special meaning?

EDIT: I've managed to boil it down to this:

\documentclass{article}

\usepackage{clefval}

\TheKey{j}{Joe}

\begin{document}
\TheValue{j}
\end{document}

Will give:

! Package inputenc Error: Invalid UTF-8 byte "A0.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.11     \TheValue{j}

And I'm willing to bet this is the problem in clefval.sty:

\nfss@text{\reset@font\bfseries^^a0????}%

Best Answer

The clefval package has been updated; the current version is 0.1, released on 2020/07/27. A diff between the old and new versions shows

10,11c10,11
< %% Copyright (C) 2004 Y. Henel, le TeXnicien de surface
< %% <Yvon.Henel@wanadoo.fr>
---
> %% Copyright (C) 2004, 2020 Y. Henel, le TeXnicien de surface
> %% <le.texnicien.de.surface@yvon-henel.fr>
14c14
< %% the LaTeX Project Public License, either version 1.2 of this license
---
> %% the LaTeX Project Public License, either version 1.3c of this license
20,23c20,21
< %% and version 1.2 or later is part of all distributions of LaTeX version
< %% 1999/12/01 or later.
< %%%% Copyright (C) 2004 by Josselin Noirel
< %%%%   and Yvon Henel <Yvon.Henel@wanadoo.fr>
---
> %%%% Copyright (C) 2004, 2020 by Josselin Noirel
> %%%% and Yvon Henel aka Le TeXnicien de surface
26,27c24,25
< \def\fileversion{v0}
< \def\filedate{2004/05/22}
---
> \def\fileversion{v0.1}
> \def\filedate{2020/07/27}
30a29
>
34c33
<   \nfss@text{\reset@font\bfseries^^a0????}%
---
>   \nfss@text{\reset@font\bfseries[?? #2 ??]}%

and the last line is the key.

The error is no longer produced.

Related Question