From: Matt Beedle Date: 2010-03-09T22:20:02+09:00 Subject: Re: US-ASCII to UTF-8 Brian Candler wrote: > Matt Beedle wrote: >> Iconv.iconv('iso-8859-1', 'utf-8', string) >> >> Iconv::IllegalSequence: "\344ftsf\374hrer" > > You just got the args the wrong way round. 'to' comes before 'from'. > (ri Iconv.iconv) > >>> RUBY_VERSION > => "1.8.7" >>> require 'iconv' > => true >>> string = "Gesch\344ftsf\374hrer" > => "Gesch\344ftsf\374hrer" >>> puts Iconv.iconv('utf-8', 'iso-8859-1', string).first > Gesch辰ftsf端hrer lol, ok, now I feel stupid. I've been messing around with this for hours! Thanks very much. -- Posted via http://www.ruby-forum.com/.