DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L2158 Version: 1.3-current I've just appended str2158.zip to the STR as a proof of concept. The zip file contains hacked versions of the following: - FL/Fl_Text_Buffer.H with declarations for characterP() and character_width(const char*...) - src/Fl_Text_Buffer.cxx with their implementations and calls to the new routines - src/Fl_Text_Display.cxx with calls to the new routines - src/xutf8/wcwidth.c Marcus Kuhn's wcwidth() implementation as discussed above Unfortunately, I've had these files hanging around for a while since I started the debugging in November 2009, so there are various other changes that show up if you just try to diff against the originals, However, if you search for the characterP() and character_width() calls, you can see that in most cases the following line is the a comment containing the original line preceded by a drg: tag. As I say, this is a dirty hack to check proof of concept, and don't know how complete it really is, or whether other problems will arise when tested against more text. As mentioned yesterday, I found that the euro character I had cut'n'pasted from somewhere into wrap_text.cxx was not really the valid UTF-8 encoding of the correct UCS character, and comes from the fact that HTML browsers often infer that 0x80 must come from the Windows-1252 rather that ISO-8859-1. Marcus Kuhn's code correctly returns -1 because 0x80 should be the PAD character... Unpack the zip file in a temp directory to be on the safe side, and make sure you save the original files before overwriting them. I've included wcwidth,c directly into Fl_Text_Buffer.cxx rather than add it to the libraries and link it in. This can be tidied up later. Does this solve your problem, sparkaround? . Link: http://www.fltk.org/str.php?L2158 Version: 1.3-current _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
