in reply to Re^2: Unicode (utf8) does not pass correctly to Windos system call.
in thread Unicode (utf8) does not pass correctly to Windos system call.

It is encoded. The print command does display correctly

That's because you do encode what you send to STDOUT (via binmode).

I did try your code snippet, but it still does not work.

It does what you asked. Maybe you asked the wrong question?

  • Comment on Re^3: Unicode (utf8) does not pass correctly to Windos system call.

Replies are listed 'Best First'.
Re^4: Unicode (utf8) does not pass correctly to Windos system call.
by jyankel (Initiate) on Nov 17, 2009 at 13:06 UTC
    I realized I posted an error in the perl code above. I corrected that (Just had some inconsistent string names when I simplified the example.) I will try and clarify my question.

    The output of the perl print statement is what I expect. The print command is correctly displayed in the uft8 encoding, however the encoded string is not encoded when it is passed through the system command to the C# application on windows. I'll try and post what I'm seeing.

    Output of perl program.
    >perl test.pl
    >Sent Ħis. Ŧ good
    >Received Ħis. Ŧ good

    Output of C# application when run by itself with the same encoded string argument that the perl program should pass to it.
    >Example.exe Ħis. Ŧ good
    >Received Ħis. Ŧ good


    By itself the C# program does display a utf8 encoded string if passed to it from the windows command prompt. On a linux system the perl script does work and the C# application receives the utf8 encoded string from the perl system() call.

    If I run the perl script on linux I get this output which is what I want.
    >perl test.pl
    >Sent Ħis. Ŧ good
    >Received Ħis. Ŧ good