Converting byte position to character position
"Per Hedbor () @ Pike (-) importm?te f?r mailinglistan" <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <[email protected]> |
I am fairly sure there is a function somewhere in glib or gtk that will actually return the char position given a byte position in a utf-8 string. And, indeed, maping at least some of the g_utf8 family of functions would probably be helpful. Say, g_utf8_pointer_to_offset(utf8,utf8+byteoffset). It might be argued that the GTK module should do this conversion automatically. -- Per Hedbor