Hi,

> $ ruby1.9.1 -e 'require "htmlentities"; t=HTMLEntities.new.encode("<élan>"); 
> puts t; puts t.encoding'
> &lt;élan&gt;
> UTF-8

That's the expected behaviour: only the basic entities are escaped by
default, i.e. only that which is necessary to produce valid HTML text.
If you want the encoder to change é, you must tell it to use :decimal,
:hexadecimal, or :named entities, thus:

    >> HTMLEntities.new.encode("<élan>", :named)
    => "&lt;&eacute;lan&gt;"

This error isn't a serious failure, and may indicate a subtle change
in how Ruby marks string encoding. Which version and patch level of
Ruby is it, and is it really 1.9.1, or is it 1.9.2 with a package name
of 1.9.1 (i.e. what does ruby -v say)?

Paul.



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to