I am using Win32::OLE to automate Microsoft Word/Excel, and I use utf8
to communicate with the applications themselves. But when I send a
UTF-8 string to a routine like

my $filename = "somethinginutf8";

$word->Documents->Open ($filename);

this produces an error. A lot of the files and directories that I need
to open have Japanese names so it isn't possible for me to avoid the
problem by just using ASCII. I've found that sending the unencoded
version of the file name works. However, because I want to write a
general module which I can release on CPAN, I would prefer to write a
general solution where the file name was automatically decoded by
Encode into the correct code page for the user.

So my question is, how can my Perl program find out what the current
code page of the user is?

Or, is there a better way to approach the problem, such as a UTF-8
aware version of Open?

Thanks for any ideas.
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to