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

Perl 5.8.? and ParseExcel

by sth (Priest)
on Jul 20, 2004 at 17:58 UTC ( #376038=perlquestion: print w/ replies, xml ) Need Help??
sth has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I am having a problem with Spreadsheet::ParseExcel and Perl 5.8.?. I get the pack warnings of,

Character in 'C' format wrapped in pack at /5.8.4/Spreadsheet/ParseExcel/FmtDefault.pm line 68

This worked with Perl 5.6.1, but does not work with 5.8. The spread sheet being parsed has not changed. I've seen this question posted, but I have not found an answer. I realize that the problem is the ascii characters are > 128 and is causing the problem. So my questions are,

- Can I supress the warnings in the calling code?

- Did I miss a solution in my searching? (my eyes are glazing over at this point)

- Or can I convert the xls file somehow, is there a parse option I am missing?

Thanks, sth

Comment on Perl 5.8.? and ParseExcel
Re: Perl 5.8.? and ParseExcel
by BrowserUk (Pope) on Jul 20, 2004 at 18:32 UTC

    The only way I can provoke that warning using pack 'C*', is if the input values are > 255? If that's the case, maybe the module should be using 'U*'.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon

      ...Yes, I should have said > 255(unsigned char).

      ..maybe the module should be using 'U*'.

      I think I did see that idea posted, somewhere in all my searching. I will try to change it and see if it works. Any idea why this is occuring with 5.8? Did Unicode not work in 5.6 ?

        Well the 'U*' didn't work, the code is parsing the xls file and adding it to a tab in another xls. Spreadsheet::WriteExcel complains about the characters being to wide. I think there has to be something I can set that will avoid this warning. Parse is defaulting to 'C*', because it is not UTF8, as far as I can tell. I saw something about setting LANG=en_us.UTF8. I'll do some more searching, since I really don't know to much about UTF8, in case you haven't noticed. :-)

        Perl's implementation of unicode changed quite a lot between 5.6.x and 5.8.x. It is, so I read, very much improved in 5.8.x but with that improvement came the need for a few non-backwards compatible changes and some extra warnings it seems. I've yet done precious little with it.


        Examine what is said, not who speaks.
        "Efficiency is intelligent laziness." -David Dunham
        "Think for yourself!" - Abigail
        "Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon

Log In?
Username:
Password:

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

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

    When choosing user names for websites, I prefer to use:








    Results (238 votes), past polls