Subject: | UTF-8 support |
Win32::IEAutomation uses Win32::OLE to all the work, but leaves its
option that specifies how to handle Perl UTF-8 stirngs set by default,
which makes Win32::OLE treat them as they were sequence of bytes in
Windows current ANSI codepage. This makes impossible to use UTF-8
strings in calls to SetValue() and other similar methods. Since IE (as
well as most other MS' own application) to support Unicode data from OLE
correctly, UTF-8 support in Win32::OLE should be enabled by
Win32::IEAutomation. This is backwards compatible change, as scripts
that try to use current CP pass strings as sequence of bytes and this
change only affect handling of "true" UTF-8 strings.
Subject: | Win32-IEAutomation-Win32-OLE-UTF8.patch |
--- IEAutomation.pm 2006-09-25 13:43:12.274429000 +0400
+++ IEAutomation2.pm 2006-10-31 16:15:45.281587500 +0300
@@ -34,6 +34,7 @@
sub _startIE{
my ($self, $visible, $maximize) = @_;
defined $self->{agent} and return;
+ Win32::OLE->Option(CP=>Win32::OLE::CP_UTF8);
$self->{agent} = Win32::OLE->new("InternetExplorer.Application") || die "Could not start Internet Explorer Application through OLE\n";
Win32::OLE->Option(Warn => 0);
Win32::OLE->WithEvents($self->{agent});