Hwo do I normalize utf8 characters in php
Posted on 2009-07-15
I need to highlight search terms using php highlight_string but I run into issues when using wide character entries as in "foobar" Note the full-width space in between.
when the original text to be highlighted contains only single space
"foo bar" those words should be highlighted as well.
it seems to work the other way around highlight_string("foo bar") will properly highlight text that contains "foobar"
ideally no matter what user types(whatever space character - people can be cutting and pasting) into search box I want that to be converted so the highlight_string works.
is there any utf8 character normalization function I can call?