in reply to Re: Re: Extra spaces in COM strings to stdout?
in thread Extra spaces in COM strings to stdout?

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.

  • Comment on Re: Re: Re: Extra spaces in COM strings to stdout?