This works in a non-rails script: def enconvert(text) conv=Encoding::Converter.new("ISO-8859-1","UTF-8", :undef => :replace, :invalid => :replace) text.each { |ln| ln=conv.convert(ln) } end
but in rails I still get an error, after "converting" the same page. SURELY SOMEONE has dealt with encoding conversion before?? ps. iconv mysteriously self-destructed on my system this morning. It worked briefly, but now require "iconv" produces an error (so iconv is now unusable on my system until I rebuild ruby). Does anyone know if Encoding::Converter uses iconv under the hood? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---