A Rough hack for 8bit input support on Cygwin or Win32

Posted by In-Ho Yi on Mon 15 Apr 2002 12:05 PM — 1 posts, 8,846 views.

#0
on line 3460 of bsd.c, change as follows :

} else if (p < pend /*&& isprint(*q)*/) { // for rough 8bit support
*p++ = *q;
}
}

This can support whole 8bit chars. Including Asian characters(which is the reason why I have done this)

Since Cygwin doesn't support locale function properly, it has only one supported locale for LC_CTYPE function such as isprint(c), isalnum(c). The only supported locale is "C" which is for English only. On the Cygwin document, they said that if MB_CAPABLE is defined, they support 3 extra one. C-JIS, C-EUCJP and C-... (sorry forget :-() I tried to imitate so that it looks like Japanese one, but I failed. So, I just breaked down 8-bit stripping part.

I hope I can help other people to use 8bit input on Win32 systems. Also, remember that this is not a secure, perfect way!!