Oh well. icu4pas lags behind. I am busy with a cross-platform solution. (As I wrote last week). It is a lot of work, though. I started from scratch.
And that should also work with dynlibs once the .so's are installed, just like the dll under windows needs to be installed. No difference there.
Note both libraries discussed here will need a big enough sample text ~1-5 KB to detect. So don't get your hopes up if you want it to detect a single string.
It is possible, though, on a larger text, to detect the encoding pretty close and convert a larger text.
Both are unusable to detect and convert shorter strings.