The list of charsets is already hard-coded, and using `Charset` types
ensures they will all be present at run-time, hence we will never
encounter an 'unsupported' charset.
PiperOrigin-RevId: 491324466
(cherry picked from commit 5292e408a6fd000c1a125519e22a7c18460eed59)