\char<number> is a TeX primitive that results in the character of ASCII code <number> with category code 12. However, it isn't expandable, unlike it's many cousins \romannumeral, \number, etc.
From my understanding, \char does not look up upper/lowercase/catcode tables, like \uppercase and \lowercase, so I'm confused as to why it unexpandable. (I'm not really sure if this is related at all, but I remember from the top of my head that it's the case for \upper/lowercase)


\expandafter. See also https://tex.stackexchange.com/questions/467360/is-there-a-list-of-expandable-tex-primitives-latex-e-tex-others – Henri Menke May 20 '21 at 11:10\characcesses a slot in a font and the glyphs at these slots are not necessarily representable in 8-bit encoding in a meaningful way. It's different for Unicode, where all characters are representable in UTF-8 encoding which is why\Ucharin LuaTeX is expandable. – Henri Menke May 20 '21 at 11:14