Using WinXP, Activestate 5.8.6 build 811
Any ideas on what I'm doing wrong?
#!/usr/bin/perl use strict; use warnings; use HTML::Entities; my $string = "’"; print "string: $string\n"; # &rsquo decode_entities($string); print "de entitied: $string\n"; # ’ print "ord of string:" . ord($string) . "\n"; # 226 encode_entities($string); print "re entitied: $string\n"; # ’ my $character = encode_entities(chr(226)); print "character 226: $character\n"; # â $character = encode_entities(chr(8217)); print "character 8217: $character\n"; # &rsquo
I think I need decode_entities to return char(8217) and not char(226)
Thanks in advance
In reply to Need advice on HTML entities by wfsp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |