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:





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:

  • The double quote is short for hex so yes, "80 is the same as 0xa0 which is the non-breaking space character and won't be immediately obvious.
    – Don Hosek
    Jul 27, 2020 at 14:41
  • Thanks. Just to check "80 is a typo? You meant "A0, right? Jul 27, 2020 at 14:52
  • 1
    a non-break space (U+A0) is in utf8 encoded as two bytes (0xC2 0xA0), but you get a complain about an invalid 0xA0 byte. That is something different. Try \catcode`^^a0=13 \def^^a0{HEREHEREHERE} perhaps it shows you where the byte is. Jul 27, 2020 at 16:18
  • 1
    I'm getting the same error, but only if the aux file isn't present. (And I don't need {frame} or inputenc.) Can you confirm that? If so, one solution would be to ignore the error so that you do get the aux file, and then it would work.
    – Teepeemm
    Jul 27, 2020 at 16:33
  • 2
    Yes, you're right. I can repro. Updated minimal example. It has to be that wacky line in clefval.sty. I'll try mailing the author. Jul 27, 2020 at 16:36

2 Answers 2


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

< %% Copyright (C) 2004 Y. Henel, le TeXnicien de surface
< %% <[email protected]>
> %% Copyright (C) 2004, 2020 Y. Henel, le TeXnicien de surface
> %% <[email protected]>
< %% the LaTeX Project Public License, either version 1.2 of this license
> %% the LaTeX Project Public License, either version 1.3c of this license
< %% 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 <[email protected]>
> %%%% Copyright (C) 2004, 2020 by Josselin Noirel
> %%%% and Yvon Henel aka Le TeXnicien de surface
< \def\fileversion{v0}
< \def\filedate{2004/05/22}
> \def\fileversion{v0.1}
> \def\filedate{2020/07/27}
<   \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.


This should work as work around (you could also reset only the catcode of ^^a0)




  • About "resetting to catcode". Do you mean changing the ^^a0 to something in the utf-8 charset? I considered this, but was unable to figure out what the line was supposed to be doing in order to choose an appropriate value. Any idea what the a0 constant is being used for? Jul 27, 2020 at 18:59
  • you can do \catcode`^^a0=12 before the style and then set it back to 13 after the style is loaded. That should work too. Or switch to a more modern keyval package. Jul 27, 2020 at 19:03
  • I should definitely switch to a better keyval package then. Jul 27, 2020 at 19:28
  • Ulrike, if you update your answer with the catcode workaround and suggest a couple of modern replacements for clefval, I'll accept the answer. Thanks for your help! Jul 27, 2020 at 19:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .