wfsp has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need advice on HTML entities
by Tanktalus (Canon) on Feb 07, 2005 at 17:24 UTC | |
by wfsp (Abbot) on Feb 07, 2005 at 17:31 UTC | |
|
Re: Need advice on HTML entities
by borisz (Canon) on Feb 07, 2005 at 17:39 UTC | |
by wfsp (Abbot) on Feb 08, 2005 at 20:12 UTC |