Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^9: how to output file in Unicode

by remiah (Hermit)
on Aug 27, 2012 at 20:44 UTC ( #990059=note: print w/ replies, xml ) Need Help??


in reply to Re^8: how to output file in Unicode
in thread how to output file in Unicode

One question. What do you use when you said "Björn"? I mean Browser? or Editor?

Back to previous.

open (OUTPUT, ">",$outputfile) or die "Cannot open filename for input: + $!";
And Open your output file with Browser.What do you see when you change "Character Encoding" of Browser? Can you change it to UTF-8?


Comment on Re^9: how to output file in Unicode
Download Code
Re^10: how to output file in Unicode
by anakin30 (Acolyte) on Aug 28, 2012 at 06:21 UTC

    this "Björn" appear only if i open the csv output file using microsoft excel

    using notepad or Editplus (editor) it looks good.

      What encoding does the "microsoft excel" program think the file is in?

      i changed it once, but it doesn't work out, i still seeing the character as "Björn".

      i don't know why? but how to ensure the output was delivered in UTF-8 encoded? is there any way i can prove?

      why the string still displayed as "Björn" even though i set the output to encoding(UTF-8), as below line

      open (OUTPUT, ">:encoding(UTF-8)",$outputfile) or die "Cannot open filename for input: $!";

        when i open the generated csv output file in excel, and when i click "save as" i see the file recognized as a *.csv file.

        Any other i can use to check the file being open on which format or encoding??

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2014-07-30 03:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls