Update ent
Refactor and fix re-encoding of encoded char sets