This library has pluggable encoding support. The basic idea is to offer the 3 basic encodings (UTF8, UTF16 and UTF32) with the native endianess directly. We are still missing 'utf16ne' support.
(support for foreign endian encoding is a possibility, but I'm not sure if it should be part of the scope of the main library, since it has a runtime cost that more likely makes more sense to be eliminated, and instead should always be translated on the borders of the application).