Share on Facebook Share on Twitter

PHP convert accented characters to ascii. Convert UTF8 to ASCII. PHP function to convert national chars into their latin equivalents. For example, convert “Biên Thùy” to “Bien Thuy” or “Höhle” to Hohle. This is usefull function when you want to have friendly url…
So, this is PHP function to replaces special characters in a string with their “non-special” counterpart.

This PHP file must be saved in UTF-8 encoding.

An other version using UTF-8 code for JavaScript as below:

Remove vietnamese accent javascript / Bỏ dấu tiếng Việt

Actually, removing accents should be processed on server side to make sure your content is rendered properly before display to user.

The function above will also replace all Vietnamese accented characters with non-accented characters.
The PHP convert accented characters to ascii function above also use to remove Vietnamese accent in URL.

Example Converting standard Vietnamese Characters to non-accent ones:


Chao mung cac ban ghe tham website cua Bien Thuy. Chuc cac ban vui ve

Last updated on March 31st, 2020 at 04:18 am


What do you think?