DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L2348 Version: 1.3-current I have been considering, but have not had the time to experiment, to add member variable to Fl_Text_Buffer that is a pointer to a "CharacterSet" class (or some such name). The buffer read from file is filtered through the CharacterSet object, and all plain ascii is passed through, valid UTF8 sequences are passed through, but any other bytes with the top bit set, would need to be mapped to UTF-8 via a lookup table in the class and then passed through. Maybe with an "append" method like Roman suggested. I hadn't thought about incomplete sequences, but maybe if there is a ring-buffer involved somewhere, the next read statement would complete any trailing incomplete UTF-8 sequences and processing could continue at the start of the sequence rather than the middle. We could provide the base class (valid ascii and UTF-8 only), plus one for Latin1 (ISO-5589 or whatever it is) and another for CP1252. Users would be free to implement their own classes that mapped top-bit bytes to whatever UTF-8 they wanted. Unfortunately this is still just an idea as my time is limited :-( Link: http://www.fltk.org/str.php?L2348 Version: 1.3-current _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
