Skip to main content.
home | support | download

Back to List Archive

isspace, locale and swish-e

From: <jmruiz(at)not-real.boe.es>
Date: Wed Nov 22 2000 - 15:51:19 GMT
	
Hi Rainer,

I have noticed some strange effect in swish.

After moving in getwords routine from comparing to ' ' to
function isspace to allow tabs I have noticed some strange
effect with some characters. Eg, with locale set to C,
the accuted i () returns TRUE in isspace('').

If I try it with a sample test program:

main()
{
printf("%d", isspace(''));
}

It returns 0 (FALSE) as expected.

The same printf inside swish.c returns 8 (TRUE) in solaris with 
locale and LC_TYPE set to C.

Have you experienced anything similar with german characters (eg: 
umlauts)?

BTW, there is a setlocale(LC_TYPE,"") in swish.c. Does it have 
sense?

cu
Jose
Received on Wed Nov 22 15:53:20 2000