Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by kal (Hermit)
on Mar 20, 2004 at 15:39 UTC ( [id://338303]=note: print w/replies, xml ) Need Help??


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

Surely it's the other way around? If it's the COM object that is actually doing the output, then the problem is that Perl is passing it UTF16 but it thinks it's receiving ASCII? Or perhaps Win32::OLE is translating to UTF16 before use, and the component isn't dealing with the character set correctly...
  • Comment on Re: Re: Extra spaces in COM strings to stdout?

Replies are listed 'Best First'.
Re: Re: Re: Extra spaces in COM strings to stdout?
by graff (Chancellor) on Mar 20, 2004 at 15:58 UTC
    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://338303]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-16 22:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found