From: Matt Beedle Date: 2010-03-09T21:50:44+09:00 Subject: US-ASCII to UTF-8 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/.