in reply to Re: HTML::Entities and Unicode quotes
in thread HTML::Entities and Unicode quotes
use Encode; use HTML::Entities; my $str = "\xe2\x80\x9cquotes\xe2\x80\x9d"; utf8::downgrade($str); print Encode::is_utf8($str) ? 1 :0, " ", encode_entities($str), "\n"; utf8::upgrade($str); print Encode::is_utf8($str) ? 1 :0, " ", encode_entities($str), "\n";
0 “quotes” 1 “quotes”
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: HTML::Entities and Unicode quotes
by Your Mother (Archbishop) on Aug 20, 2011 at 16:41 UTC | |
by ikegami (Patriarch) on Aug 20, 2011 at 20:59 UTC | |
by Your Mother (Archbishop) on Aug 20, 2011 at 22:48 UTC | |
by ikegami (Patriarch) on Aug 20, 2011 at 23:01 UTC |