Bill: > You need to remove the function that takes a single byte and says how > long the UTF-8 character is. This was mostly removed in fltk2.0 which is > why it works better, but this was not finished. The text editor has a > lot of api that takes a byte rather than a pointer making fixing this > difficult. > > The proper function is utf8decode which will do something correct with > errors in the UTF-8, turning each byte in the error into a replacement > (such as turning them to CP1252 or to 0xFFFD or whatever depending on > the ifdefs). It is not possible to figure out if you are looking at an > error byte or the start of a UTF-8 character unless you pass a pointer > and allow more than one byte to be looked at. > > I recomend deleting the utf8len (or whatever it is called) that takes a > byte, and then doing the necessary work to get things to compile without > using this call. Then probably text editing will be a lot better.
Although I'd sort of come to the same conclusion, I still can't get my head around the potential difficulties involved in stepping backwards through the byte array. Do you remember this as an issue in FLTK-2 ? D. _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
