CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Understanding UTF-8 Output with XMLin and Map

 



joggi
New User

Feb 24, 2014, 6:27 AM

Post #1 of 1 (703 views)
Understanding UTF-8 Output with XMLin and Map Can't Post

Hi,
I've been set an assignment to get a xml file from a web api, and then work out how many times an author occurs and print out my tabulated results.

I did this by using XMLin (from XML::Simple) and LWP::Simple Get function.
Then when I dump out the data with Data::Dumper, the characters are encoded in their original \x37 etc..


I've got to create a report on how I output the data, and one key point is how I dealt with the UTF-8 to make it output correctly.

To print out my results I used a Hash function with a linear sort to arrange in descending order. Then printed them into tables with help of the print table() command.

Extra: using cgi.

The confusing part: It didn't work, then I tried adding Stdout and use utf8, which didn't work either, then I deleted those and it started working Crazy

This prints out the UTF-8 correctly now,
So my question is; how does it output the utf 8 correctly into the table?
& why does this work suddenly? Unimpressed

Thanks in advance

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives