From: Guillaume Ebuprofen Date: 2012-02-04T13:25:12+09:00 Subject: Encoding error Hello, I have an error with this code : # encoding: UTF-8 str="rép" puts str.encoding str=Marshal.dump(str) puts str.encoding str=str.encode('UTF-8') puts str.encoding when I run this code I obtain : UTF-8 ASCII-8BIT test.rb:6:in `encode': "\xC3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError) from test.rb:6:in `
' I don't understand where is my fault ? I use ubuntu 11.10 with echo $LANG=fr_FR.UTF-8 beast regards, -- Posted via http://www.ruby-forum.com/.