Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Using Win32::OLE and Excel - Tips and Tricks

by EverLast (Scribe)
on Aug 19, 2003 at 09:29 UTC ( #284830=note: print w/ replies, xml ) Need Help??


in reply to Re: Using Win32::OLE and Excel - Tips and Tricks
in thread Using Win32::OLE and Excel - Tips and Tricks

Actually, I was faced with the same problem.

After fixing other issues (thank god for PerlMonks!), I found the cure:

use Win32::OLE qw(CP_UTF8); ... # Work in unicode! $Win32::OLE::CP = CP_UTF8; ...
You can use Unicode::String to unpack() the string to look at each unicode char (which was what I had to do).

Cheers
---Lars


Comment on Re: Re: Using Win32::OLE and Excel - Tips and Tricks
Download Code
Re: Re: Re: Using Win32::OLE and Excel - Tips and Tricks
by Anonymous Monk on Aug 21, 2003 at 12:17 UTC
    Actually, using Unicode::String as a container for your data is not needed (in fact, it will croak on acctented chars and other punctuation). Just use the string as you 'normally' do, i.e. to look at each char:

    for my $uchar (split(//, $text)) { my $ord = ord($uchar); ... }
    While it seems natural to me now, it took me some time to locate that my troubles with unicode strings was *using* Unicode::String... :-)

    ---Lars

Reaped: Re^3: Using Win32::OLE and Excel - Tips and Tricks
by NodeReaper (Curate) on Mar 18, 2007 at 21:13 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2014-09-02 13:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (22 votes), past polls