Generate text encoding names and aliases from encodings.json (plus WebKit-specific data). Doing it this way will remove some grungy macros that define our name tables, and will make it more obvious where we diverge from the Encoding Standard. It might be necessary to fix #19307 first to accomplish this cleanly.
Alex, is this still something we need after the various rounds of cleanup you did?
Per https://github.com/web-platform-tests/wpt/pull/36096 this might still be good. We do acknowledge the x-mac-* encodings, but I don't see EUC-TW mentioned there as being non-compliant or intentional.
Source/WebCore/PAL/pal/text/TextCodecICU.cpp maintains a registry now. It lists some non-standard encodings such as EUC-TW, but that is something to address separately. The only slight further improvement here would be generating it from encodings.json, but it's not at all clear that is worth the effort given the rate of change.