Search code examples
phpwordpressunicodencr

php convert Unicode NCR to original


In Wordpress, when adding a new category with a Chinese/Cyrillic charters i get a slug that looks like %e5%85%ac%e5%af%93 (this is how is saved in Mysql).

How can i convert back this string into original charters (Chinese, Cyrillic , Hebrew etc...)


Solution

  • Isn't PHP's urldecode() enough?

    php> echo urldecode('%e5%85%ac%e5%af%93')
    公寓