I want to convert diacritical characters (ñ, á, é, ...) to plain characters . I would prefer a simple开发者_开发问答 regexp solution (as in: an oneliner) in JavaScript or jQuery.
Here you have a javascript solution
http://dense13.com/blog/2009/05/03/converting-string-to-slug-javascript/
Hope this helps.
You can do it in php like this:
$normalized = iconv('UTF-8', 'ASCII//TRANSLIT', $string);
For example, it will convert ñáé
to nae
Hope this helps. Cheers
精彩评论