Well to be honest, Win32 stuff is just not part of my world these days (hardly ever was), so I don't really have a clue what COM objects are or how they work. I just happened to recall that a number of MS-Win thingies do seem to use UTF-16LE natively for text data, and when their native data happens to go through some other process that normally doesn't use or expect UTF-16 encoding, you get strange behavior, including the sort of thing displayed in the OP.

Maybe the module author(s) involved should be consulted or alerted about this -- or maybe a closer reading of the relevant module man pages would help...

update: Having just looked at Win32::OLE, I would say (guessing again) that the solution lies in understanding what the "Logger" application really does, and making sense of the paragraph in the Win32::OLE man page that describes "Localization". It may be that there really is no problem at all with the perl app and module usage described in the OP -- the monk simply needs to use the appropriate (UTF-16-aware) methods for reading the Logger output.


In reply to Re: Re: Re: Extra spaces in COM strings to stdout? by graff
in thread Extra spaces in COM strings to stdout? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.