Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: how to get exactly same text from a file

by Anonymous Monk
on Nov 26, 2012 at 13:15 UTC ( [id://1005648]=note: print w/replies, xml ) Need Help??


in reply to Re: how to get exactly same text from a file
in thread how to get exactly same text from a file

Ok, my perl is 5.14. this is the garbled character : ต้มยำกุ้ง I'm getting from the website and I want to convert it into it's real form. Any idea how to do this?
  • Comment on Re^2: how to get exactly same text from a file

Replies are listed 'Best First'.
Re^3: how to get exactly same text from a file
by Anonymous Monk on Nov 26, 2012 at 17:11 UTC

    Since you're using HTTP (you should've said so in the beginning!), which encoding do you serve your output with? (the Content-Type header.) Which encoding is the file saved with? (ISO8859-1, 8859-15, UTF-8, UTF-16LE?) What output does perl -MData::Dumper -e '$Data::Dumper::Useqq=1;  print Dumper(scalar <>)' test.txt give you? Can you view the file in a terminal? What is your terminal's encoding?

    (I'm interested in a Danish-to-Hindi translator, so if your code happens to output the file in Hindi, I'd love to examine it.)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1005648]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-25 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found