# Reliable character encodings conversion

**URL:** <https://www.ruby-forum.com/t/reliable-character-encodings-conversion/196818>\
**Category:** Rails\
**Created:** [September 30, 2008, 2:34pm UTC](https://www.ruby-forum.com/t/reliable-character-encodings-conversion/196818 "2008-09-30T14:34:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hubert\_SSSSSSSSSpic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/73ab20/32.png) [@Hubert\_SSSSSSSSSpic](https://www.ruby-forum.com/u/Hubert_SSSSSSSSSpic)\
**Post date:** [September 30, 2008, 2:34pm UTC](https://www.ruby-forum.com/t/reliable-character-encodings-conversion/196818/1 "2008-09-30T14:34:06Z")

</div>

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
