> Regarding this warning: > > Fl_Help_View.cxx:1493:2: warning: #warning this isspace & > 255 test will probably not work on a utf8 stream... And we > use it everywhere! > > ..which refers to these lines: > > while (isspace((*ptr)&255)) > ptr ++; > > ..hmm, I'm not sure why that would be a problem since ptr is a > const char*, and where UTF8 is a stream of bytes, each byte being > in the range 0~255, and non-ascii UTF8 sequences must be outside > of the ascii range (ie. all bytes > 127, IIRC) > > I think the purpose of the &255 is to sign convert the > signed char to an unsigned char. For instance, this test program:
Yes - to be honest, it's probably OK... The code is littered with warnings that I added as I was going along. Mostly they mark places where I suspected I was going awry, but as I was pushing ahead to get the port in, I didn't want to actually *think* about it at the time... In this case, I was concerned that there's more than one type of "space" character in Unicode, and that using this test might not find them all - or worse, might find part of a multi-byte character and declare it a "space" erroneously. I still haven't stopped to think if that's actually true or not, however... Hence the warning. If someone else knows for sure, I'd welcome the input! -- Ian SELEX Sensors and Airborne Systems Limited Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

