<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>