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

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Fri May 18 06:37:38 UTC 2012


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

On Fri, May 18, 2012 at 7:43 AM, cm <xiao.ao.jiang.hu.cm at gmail.com> wrote:

> I had try Python2.7 console in the Windows, it work fine.
> code page is 936, and i used google pinyin input method.
>
> Python 2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)]
> on win
> 32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> print "o"
> o
> >>> print "好"
>>
> I dont know the difference of input code between Ecl and Python, maybe the
> Python code is usefull to you.
>
>
> 2012/5/18 Juan Jose Garcia-Ripoll <juanjose.garciaripoll at googlemail.com>
>
>> 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
>>
>
>


-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20120518/c086cdee/attachment.html>


More information about the ecl-devel mailing list