develooper Front page | perl.beginners | Postings from August 2009

Re: HTML::TreeBuilder encode symbols as html entities

Thread Previous | Thread Next
Shawn H. Corey
August 14, 2009 06:35
Re: HTML::TreeBuilder encode symbols as html entities
Message ID:
Roman Makurin wrote:
> dump result is html encoded entities:
> <h4> @
>   <a class="a01" href="hidden_url" rel="bookmark"
> title="&#x421;&#x441;&#x44B;&#x43B;&#x43A;&#x430; ">@
> all html entities are valid unicode code points of symbols. But why
> HTML::TreeBuilder convert symbols to entities ?

Because some browsers do not understand Unicode.  Or they didn't.

> If I just do
> print $content, $/;
> everything is ok, all symbols are symbols not html encoded entities.

Yes, this output is to your screen, not to a browser, so it's encoding 
in way that would make it readable.

Just my 0.00000002 million dollars worth,

Programming is as much about organization and communication
as it is about coding.

I like Perl; it's the only language where you can bless your

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About