This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Date field of ls -l command is garbled in latest cygwin1.dll snapshot.


On Sat, 23 Jun 2018 02:47:37 +0900
Takashi Yano wrote:
> In the latest cygwin1.dll snapshot, the date field of "ls -l" command
> is garbled if LANG=ja_JP.UTF-8.

I looked into this problem, and found this is caused by incorrect
return value of iswprint().

A simple test case is attached.
The expected result of the test case is: 111111
However, in the latest snapshot, result is: 111000

I think Thomas can easily fix this.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>
#include <stdio.h>
#include <locale.h>
#include <wchar.h>
#include <wctype.h>

int main()
{
	wchar_t w[] = L"ABC���";
	wchar_t *p;

	setlocale(LC_ALL, "ja_JP.UTF-8");
	for (p=w; *p; p++) {
		printf("%d", iswprint(*p));
	}
	printf("\n");
	return 0;
}

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]