XML::Simple encoding problem
From: Ed Waldspurger (ewald_at_electronicfrontiers.com)
Date: 06/30/04
- Next message: gorbunok: "Apache 2.0 API"
- Previous message: Erik Aronesty: "minor patch to net::server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 30 Jun 2004 17:58:06 GMT
I am having a problem displaying data read in using XML::Simple. I am
reading in the data, and then displaying it on a web page. The data has
a é (lowercase e acute) in it, this is the character that is not being
displayed properly.
Here is the contents of the XML file.
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<Location>
<LocationName>Northside Café</LocationName>
</Location>
Here is a link to the XML file.
<http://www.certifichecks.com/biz/test.xml>.
After reading the xml data in, the e acute is being displayed as the A
tilde and copyright characters (in my browser at least). Here is the
code snippet that reads the xml file and then displays the data. I am
using CGI.pm to create the output.
my $xmlref = XMLin('test.xml');
print $cgi->pre( dump($xmlref) );
print $cgi->h2("Location Name: $xmlref->{'LocationName'}");
You can see the output of the script here.
<http://www.certifichecks.com/cgi-bin/xml_test.pl>
I'm not sure if the problem is in the XML file itself, when XML::Simple
reads the data in, or when I try to display the data on the web page.
Where is the actual problem, and how do I display the data properly?
I am running Perl 5.6.1 on FreeBSD 4.4
Thank You
Ed Waldspurger
- Next message: gorbunok: "Apache 2.0 API"
- Previous message: Erik Aronesty: "minor patch to net::server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|