Should ignore invalid or undefined characters #439

Merged
merged 3 commits into from Nov 17, 2012

2 participants

@ochko
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
@mikel
Owner

Thanks :)

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