[PATCH 2/2] msvcrt: Fixed fgetwc behavior on multibyte characters and unicode files
Akihiro Sagawa
sagawa.aki at gmail.com
Wed Mar 20 03:41:46 CDT 2013
On Mon, 18 Mar 2013 17:11:04 +0100, Piotr Caban wrote:
> + char mbs[2];
This should be a constant, like MSVCRT_MB_LEN_MAX.
> + int len = 0;
> + ch = MSVCRT_fgetc(file);
> + if(ch != MSVCRT_EOF) {
> + mbs[0] = (char)ch;
> + if(MSVCRT_isleadbyte(mbs[0])) {
This doesn't work correctly if char is signed. Because _isleadbyte()
expects the value of unsigned char or EOF as well as other is- functions.
I wrote some fgetwc() tests. Please refer following page:
https://testbot.winehq.org/JobDetails.pl?Key=24806
Akihiro Sagawa
More information about the wine-devel
mailing list