Your strategy of using char and character constants in a switch should be absolutely portable for any standard conforming C implementation since the C standard explicitly mandates that those characters that you're interested in are in the basic source and basic execution character sets.

That said, is supporting EBCDIC just an exercise, or is it of some practical concern? There may be a few legacy systems that use it today, but writing new software that explicitly has it in mind seems a little strange in 2022.