Displaying HTML entities

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hi,  I am parsing hex encoded HTML entities characters and on printing
them to secureCRT window i see different results.

my $str =
$str =~ s/%([0-9a-fA-F])/chr(hex($1))/eg;       #Change hex to
print "$str\n";

The output on one Sun box (SunOS 5.8 Generic_108528-13 sun4u sparc
SUNW,Sun-Fire) in secureCRT window (SecureCRT version 3.2.1 (32-bit))
i get the following,
ABCDyz~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘'""•–—˜™š›œžŸ กข xyz
(The above line has ~50 chars including decimal (128 to 160 code
points).  See http://www.bbsinc.com/symbol.html if your
terminal/window is not displaying all chars.)
and on another Sun box (5.8 Generic_108528-14 sun4u sparc
SUNW,Sun-Fire-880) again in another secureCRT windows (same version as
above) i get the following,
ABCDyz                                  กข xyz
(in the display, i see blanks between "}" to xyz at the end of the
string, but if i cut and paste output to MS notepad i see all chars.
or if i use "less" command to display the output i see hex 80 to A2

Any help is appreciated,

Site Timeline