On Sat, 26 Aug 2006 09:21:12 +0100 Chris Smith <chris@xxxxxxxxxxxxx> wrote: > Andreas Gohr wrote: > > > > I noticed the use of some strlen calls there. Are they > > used in a UTF-8 safe way there or would it be possible that they > > split a multibyte char? If that could happen we should add a check > > to strip invalid UTF-8 chars from beginning and end of the snippet - > > this would be a nice addition to the utf-8 lib. > > Yes, I think that is the best solution, adjusting the strings to > ensure they always start/end at utf-8 character boundaries. I'll see > what I can come up with. I just pushed a patch adding a function from Harry's utf8 library to strip bad bytes. Andi -- http://www.splitbrain.org -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist