in reply to Re^5: unpacking wmic command's unicode output
in thread unpacking wmic command's unicode output

I didn't suggest
wmic.exe process > junk
I suggested you drop the -CS, so you need to compare
wmic.exe process | perl -CS -pe1 > junk
to
wmic.exe process | perl -pe1 > junk

It's simple,

Replies are listed 'Best First'.
Re^7: unpacking wmic command's unicode output
by goibhniu (Hermit) on Nov 12, 2008 at 20:57 UTC

    Now I'm confused. a) how would it hurt? b) Why does it seem not to hurt in my use now?


    #my sig used to say 'I humbly seek wisdom. '. Now it says:
    use strict;
    use warnings;
    I humbly seek wisdom.

      how would it hurt?

      >perl -e"print qq{C\x00a\x00p\x00}" | perl -CS -we"print length <>" 6

      Why does it seem not to hurt in my use now?

      Because -CS has no effect if there are no bytes with bit 7 set.

        but that's not -CS's fault, as it prints 6 without -CS as well. Or am I missing something still?


        #my sig used to say 'I humbly seek wisdom. '. Now it says:
        use strict;
        use warnings;
        I humbly seek wisdom.