[dokuwiki] Re: search improvements

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.


--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: