Reliable character encodings conversion

Hi,

I am looking for reliable and error-resistant way to convert character
encodings to UTF8. Input encodings vary, and I have quite good input
encodings detection in place.

I am using Iconv library wrapper to convert texts to UTF8, but it’s
throwing “Iconv::IllegalSequence” exception. The problem is that input
texts are user-generated and have sometimes mixed characters
encodings.

Does anyone have any experience with these kind of situations, or can
suggest alternative libraries?

Thanks,
Hubert