On Aug 24, 2010, at 2:26 AM, Michel Demazure <michel / demazure.com> wrote: > According to Nokogiri's doc, it works internally in UTF-8. > Running this : > > # encoding: utf-8 > > require 'nokogiri' > > class MyDoc < Nokogiri::XML::SAX::Document > def characters(string) > puts string.encoding > puts string > end > end > > puts RUBY_VERSION > puts Encoding.default_external > > parser = Nokogiri::XML::SAX::Parser.new(MyDoc.new, 'UTF-8') > parser.parse('<foo>épée</foo>') What does a plain put with this string give you? What if you redirect nokogiri's output to a file and view it in whatever you entered the above string in?