Add hooks for custom character encoding conversion
Sometime around 2012, ICU support was added to libxml2. I think the only reason was to better support WebKit which already used ICU. Unfortunately, this led distros like Debian to also enable ICU support. This adds a huge dependency for presumably just a single user, unnecessarily increasing the attack surface for the rest of the world.
A better approach is to add hooks to install a custom character encoding converter on a parser context and add example code for ICU, similar to the sorting hooks in libxslt: https://gitlab.gnome.org/GNOME/libxslt/-/blob/master/examples/xsltICUSort.c?ref_type=heads
Then we could hopefully phase out ICU support.