Probably this might be the answer: Windows is processing the text in those streams, an action that can be reversed<div><a href="http://msdn.microsoft.com/library/tw4k6df8%28VS.80%29.aspx">http://msdn.microsoft.com/library/tw4k6df8%28VS.80%29.aspx</a><br>

<br><div class="gmail_quote">On Fri, May 18, 2012 at 7:43 AM, cm <span dir="ltr"><<a href="mailto:xiao.ao.jiang.hu.cm@gmail.com" target="_blank">xiao.ao.jiang.hu.cm@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I had try Python2.7 console in the Windows, it work fine.<br>code page is 936, and i used google pinyin input method.<br><br>Python 2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win<br>32<br>Type "help", "copyright", "credits" or "license" for more information.<br>


>>> print "o"<br>o<br>>>> print "好"<br>好<br><br>I dont know the difference of input code between Ecl and Python, maybe the Python code is usefull to you.<div class="HOEnZb"><div class="h5">

<br><br><div class="gmail_quote">
2012/5/18 Juan Jose Garcia-Ripoll <span dir="ltr"><<a href="mailto:juanjose.garciaripoll@googlemail.com" target="_blank">juanjose.garciaripoll@googlemail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>Test program:</div>
<div>#include <fcntl.h><br>#include <errno.h></div>
<div>int main()<br>{<br>  char buffer;<br>  int ok;<br>  do {<br>    ok = read(0, &buffer, 1);<br>    printf("\ncode=%d %x errno=%d, ok=%d", buffer, buffer, errno, ok);<br>  } while (ok > 0);<br>}<br></div>





<div> </div>
<div>Output:</div>
<div> </div>
<div>C:\cygwin\home\Juanjo\src\ecl\win32>chcp 936<br>Active code page: 936</div>
<div>C:\cygwin\home\Juanjo\src\ecl\win32>echo 亀 | foo.exe</div>
<div>code=-127 ffffff81 errno=0, ok=1<br>code=119 77 errno=0, ok=1<br>code=32 20 errno=0, ok=1<br>code=10 a errno=0, ok=1<br>code=10 a errno=0, ok=0<br>C:\cygwin\home\Juanjo\src\ecl\win32>foo.exe<br>亀</div>
<div>code=-127 ffffff81 errno=22, ok=-1</div>
<div> </div>
<div>So it definitely seems that Windows's C library does not allow input ifrom the console n other codepages?</div>
<div> </div>
<div>Juanjo</div>
</blockquote></div><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com" target="_blank">http://juanjose.garciaripoll.googlepages.com</a><br>


</div>