Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: UTF-8 issues with Perl in general and with Spreadsheet::WriteExcel

by elef (Friar)
on Jul 16, 2010 at 10:19 UTC ( [id://849961]=note: print w/replies, xml ) Need Help??


in reply to Re: UTF-8 issues with Perl in general and with Spreadsheet::WriteExcel
in thread UTF-8 issues with Perl in general and with Spreadsheet::WriteExcel

Thank you, that sounds convincing.

I tried simply adding "<:utf8" to the open command in the Spreadsheet:WriteExcel script and it seems to have fixed the problem.

I understand how the same concept applies to input from STDIN in the first script, but I don't understand the actual code. Why is the while loop necessary and what do I put inside the loop? And what's the scope of "binmode STDIN..."? All that follows or just the next instance when STDIN is used? (i.e. do I just include it once at the start of the script or before each input from STDIN? - your post seems to suggest I need to add this line every time I expect input with fancy characters.)

  • Comment on Re^2: UTF-8 issues with Perl in general and with Spreadsheet::WriteExcel

Replies are listed 'Best First'.
Re^3: UTF-8 issues with Perl in general and with Spreadsheet::WriteExcel
by almut (Canon) on Jul 16, 2010 at 11:05 UTC
    do I just include it once at the start of the script or before each input from STDIN?

    Including it once is sufficient.  It adds another PerlIO layer to the file handle (STDIN here), which remains in effect for the lifetime of the file handle (or until you change it again with another binmode).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-19 06:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found