From: "Pedro G." Date: 2012-01-14T01:09:37+09:00 Subject: Re: Ruby1.9: Encoding problems (how to use #force_encoding ?) "That's correct. Transcoding tries to *transcode* (replace characters one at a time), and these high characters in ASCII-8BIT have no Unicode equivalents." It isn't true, in fact, \xc characters are Unicode code points and not ASCII-2 charactes. You have a Unicode String (with encoding UTF-8) with an encoding incorrectly set to ASCII-2, to solve this problem try this: begin str.encode! Encoding::UTF_8 if str.encoding != Encoding::UTF_8 rescue Encoding::UndefinedConversionError #string incorrectly encoded try force str.force_encoding Encoding::UTF_8 end -- Posted via http://www.ruby-forum.com/.