I'm having trouble in with us-ascii strings. I have written a script
which receives emails straight from postfix.  The emails are generally
encoded in "iso-8859-1", and I can't get all of the characters to
display properly, and I can't save to my mongodb database, either. Here
is an example problem string:

In irb by default it displays like this:

Gesch´┐?ftsf´┐?hrer

If I set $KCODE = 'iso-8859-1' then it gets a bit better:

Gesch\344ftsf\374hrer

But how do I now make that into the correct string:

Gesch├Ąftsf├╝hrer

I have tried Iconv:

Iconv.iconv('iso-8859-1', 'utf-8', string)

Iconv::IllegalSequence: "\344ftsf\374hrer"

Please help!
-- 
Posted via http://www.ruby-forum.com/.