Should ignore invalid or undefined characters #439

merged 3 commits into from Nov 17, 2012

2 participants

Iconv.conv("UTF-8//TRANSLIT//IGNORE", charset, body_text)

It ignores invalid or undefined chars.

In ruby 1.9 it should be:

body_text.encode(Encoding::UTF_8, :undef => :replace, :invalid => :replace, :replace => '')
@mikel mikel merged commit 3f69873 into mikel:master Nov 17, 2012

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment