Why Normalizer::normalize (PHP) doesn't work?

前端 未结 4 1530
抹茶落季
抹茶落季 2020-12-19 08:20

I\'m trying to normalize strings with characters like \'áéíóú\' to \'aeiou\' to simplify searches.

Following the response to this question I should use the Nor

4条回答
  •  猫巷女王i
    2020-12-19 08:52

    For a function that actually removes the accents, the best that I have found so far is in the wordpress core: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/formatting.php#L1127 remove_accents($string)

    (Note I have filed a bug against it in order for them to take an updated version that I provided which documents each character and how it is tranlsted. so it may change in the future)

提交回复
热议问题