On 12.04.2012, at 19:10, chris wrote:

> Oops, this should have been:
> 
> I now use
> 
> t.position(pos_to_offset(t.value(),2));
> 
> to convert UTF-8 character count to byte offset.

The original API of FLTK 1 was ASCII only. We have done a bunch of compromises 
to be able to make UTF8 work (as UTF8 is basically an ASCII extension with 
variable-length multi-byte characters). Finding the n'th character in a line of 
text requires a loop that counts through the length of characters.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to