|Keep It Simple, Stupid|
Re^11: unpacking wmic command's unicode outputby BrowserUk (Pope)
|on Nov 12, 2008 at 21:50 UTC||Need Help??|
As a solution, it's useless and therefore wrong.
Hm. That's a bit strong. As a solution, it produces the desired result. Ie. The data in the file is sans unicoding.
The fact that the -CS isn't actually responsible for that--nor even perl itself directly--doesn't detract from the usability of the solution to produce desired result.
As it turns out, wmic process | perl -pe1 > file also produces the desired result, and as its 3 characters shorter I guess that makes it a superiour solution. I would have suggested that; had I thought to have tried it.
It turns out that it just going via a pipe that causes wmic.exe to produce ansi output rather than unicode, so a simple wmic process | tee > file works.
And it's even shorter.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.