in reply to Win32::OLE with non-ANSI data

Re: Using Win32::OLE and Excel - Tips and Tricks Win32::OLE SAPI.SpVoice Japanese
Win32::OLE->Option (CP => Win32::OLE::CP_UTF8); use Win32::OLE qw(CP_UTF8);

Replies are listed 'Best First'.
Re^2: Win32::OLE with non-ANSI data (use Win32::OLE qw(CP_UTF8);
by freonpsandoz (Beadle) on Mar 27, 2022 at 05:22 UTC

    Thanks, that seems to have worked.

Re^2: Win32::OLE with non-ANSI data (use Win32::OLE qw(CP_UTF8);
by freonpsandoz (Beadle) on Mar 29, 2022 at 03:18 UTC

    Reading the Win32::OLE CP option documentation more carefully, I see why I was confused. It refers to "translations between Perl strings and Unicode strings," but it really means "translations between octets and OLE Unicode strings," doesn't it? Does the CP_UTF8 option mean "strings that are in Perl's internal representation," or should Perl strings be encoded to and decoded from UTF-8 octets when passing data to/from this interface? Thanks.