> > Sounds like an STR should be made with a small test program > with "\xc2\xb1" > > as the tooltip (or perhaps even a regular label string > could trigger it). > > 'C2B1' would be the correct UTF8 for the plusminus sign > (U+00B1). The problematic .fl file contains only 'B1'!
I tried various combinations (albeit on windows and linux, my mac is not available just now) and I can't induce a fault - so the fault is possibly mac-specific... Anyway, what I find is that both "\xc2\xb1" and just the (not-valid-utf8) "\xb1" display a plusminus glyph on the display. I assume the later case is because ERRORS_TO_ISO8859_1 is set in fl_utf.c, so the bad "\xb1" falls-through to become U+00B1 anyway... Now, this probably works because both the *nix conversions and the win32 "char-by-char" conversions use fl_utf8decode() to do the conversion from utf8 to native. The win32 "string-by-string" conversions, and *I think* the Mac conversions, use fl_utf8toUtf16() instead, and it does not honour the ERRORS_TO_ISO8859_1 setting, so will fail on the "bad" string, I guess. Maybe that is key here? Anybody? On a related note, it is suggested (by people who know good stuff, e.g. Bill, Manolo) that the win32 conversions be converted to all be "string-by-string", dropping the old "char-by-char" mechanism. If we do, then ERRORS_TO_ISO8859_1 may also fail on win32 in future? Hmm, yup, just tested that by using the ::draw(int angle, const char* str...) version of the win32 draw text method, and indeed it fails, though does not cause a crash, just doesn't work... SELEX Galileo Ltd 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

