[Ecls-list] ECL 12.2.1 can not work with CJK language!

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Thu May 17 22:44:53 UTC 2012


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

Output:

C:\cygwin\home\Juanjo\src\ecl\win32>chcp 936
Active code page: 936
C:\cygwin\home\Juanjo\src\ecl\win32>echo 亀 | foo.exe
code=-127 ffffff81 errno=0, ok=1
code=119 77 errno=0, ok=1
code=32 20 errno=0, ok=1
code=10 a errno=0, ok=1
code=10 a errno=0, ok=0
C:\cygwin\home\Juanjo\src\ecl\win32>foo.exe
亀
code=-127 ffffff81 errno=22, ok=-1

So it definitely seems that Windows's C library does not allow input ifrom
the console n other codepages?

Juanjo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20120518/00b53665/attachment.html>


More information about the ecl-devel mailing list