I think your best bet is to have a look at https://github.com/processone/iconv, and see if that works for your needs
There is also https://github.com/tallakt/codepagex, which seems to be used a lot.
Take a look at my thread some months ago: Sharing with the community: text transcoding libraries
Basically, I went with
Resolved with this PR https://github.com/eugenehr/erlyconv/pull/1 in the