Remove & Replace Letter Accents In Text Fields - removeAccented

Remove & Replace Letter Accents In Text Fields - removeAccented

removeAccented is a small & useful jQuery plugin for multi-language web apps that remove and replace accented characters with plain ASCII ones in a text field

Also can be used for URL slug generator that automatically removes accents from text to create standard, SEO friendly SEO slugs.

1. Download and insert the minfied version of the removeAccented plugin after jQuery.

<script src="https://code.jquery.com/jquery-1.12.4.min.js" 
        integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" 
        crossorigin="anonymous">
</script>
<script src="removeAccented.js"></script>

2. Call the function removeAccentedChar on the text field and done.

<textarea id="text-example"></textarea>
<input type="text" id="input-example">
$(function () {
  // on change
  $('#text-example, #input-example').change(function () {
    $(this).removeAccentedChar();
  });
});

3. All accents supported:

  1. ä, æ, ǽ --> 'ae'
  2. ö, œ --> 'oe'
  3. ü --> 'ue'
  4. Ä --> 'Ae'
  5. Ü --> 'Ue'
  6. Ö --> 'Oe'
  7. À, Á, Â, Ã, Ä, Å, Ǻ, Ā, Ă, Ą, Ǎ, Α, Ά, Ả, Ạ, Ầ, Ẫ, Ẩ, Ậ, Ằ, Ắ, Ẵ, Ẳ, Ặ, А --> 'a'
  8. à, á, â, ã, å, ǻ, ā, ă, ą, ǎ, ª, α, ά, ả, ạ, ầ, ấ, ẫ, ẩ, ậ, ằ, ắ, ẵ, ẳ, ặ, а --> 'a'
  9. Б --> 'B'
  10. б --> 'b'
  11. Ç, Ć, Ĉ, Ċ, Č --> 'C'
  12. ç, ć, ĉ, ċ, č --> 'c'
  13. Д --> 'D'
  14. д --> 'd'
  15. Ð, Ď, Đ, Δ --> 'Dj'
  16. ð, ď, đ, δ --> 'dj'
  17. È, É, Ê, Ë, Ē, Ĕ, Ė, Ę, Ě, Ε, Έ, Ẽ, Ẻ, Ẹ, Ề, Ế, Ễ, Ể, Ệ, Е, Э --> 'E'
  18. è, é, ê, ë, ē, ĕ, ė, ę, ě, έ, ε, ẽ, ẻ, ẹ, ề, ế, ễ, ể, ệ, е, э --> 'e'
  19. Ф --> 'F'
  20. ф --> 'f'
  21. Ĝ, Ğ, Ġ, Ģ, Γ, Г, Ґ --> 'G'
  22. ĝ, ğ, ġ, ģ, γ, г, ґ --> 'g'
  23. Ĥ, Ħ --> 'H'
  24. ĥ, ħ --> 'h'
  25. Ì, Í, Î, Ï, Ĩ, Ī, Ĭ, Ǐ, Į, İ, Η, Ή, Ί, Ι, Ϊ, Ỉ, Ị, И, Ы --> 'I'
  26. ì, í, î, ï, ĩ, ī, ĭ, ǐ, į, ı, η, ή, ί, ι, ϊ, ỉ, ị, и, ы, ї --> 'i'
  27. Ĵ --> 'J'
  28. ĵ --> 'j'
  29. Ķ, Κ, К --> 'K'
  30. ķ, κ, к --> 'k'
  31. Ĺ, Ļ, Ľ, Ŀ, Ł, Λ, Л --> 'L'
  32. ĺ, ļ, ľ, ŀ, ł, λ, л --> 'l'
  33. М --> 'M'
  34. м --> 'm'
  35. Ñ, Ń, Ņ, Ň, Ν, Н --> 'N'
  36. ñ, ń, ņ, ň, ʼn, ν, н --> 'n'
  37. Ò, Ó, Ô, Õ, Ō, Ŏ, Ǒ, Ő, Ơ, Ø, Ǿ, Ο, Ό, Ω, Ώ, Ỏ, Ọ, Ồ, Ố, Ỗ, Ổ, Ộ, Ờ, Ớ, Ỡ, Ở, Ợ, О --> 'O'
  38. ò, ó, ô, õ, ō, ŏ, ǒ, ő, ơ, ø, ǿ, º, ο, ό, ω, ώ, ỏ, ọ, ồ, ố, ỗ, ổ, ộ, ờ, ớ, ỡ, ở, ợ, о --> 'o'
  39. П --> 'P'
  40. п --> 'p'
  41. Ŕ, Ŗ, Ř, Ρ, Р --> 'R'
  42. ŕ, ŗ, ř, ρ, р --> 'r'
  43. Ś, Ŝ, Ş, Ș, Š, Σ, С --> 'S'
  44. ś, ŝ, ş, ș, š, ſ, σ, ς, с --> 's'
  45. Ț, Ţ, Ť, Ŧ, τ, Т --> 'T'
  46. ț, ţ, ť, ŧ, т --> 't'
  47. Þ, þ --> 'th'
  48. Ù, Ú, Û, Ũ, Ū, Ŭ, Ů, Ű, Ų, Ư, Ǔ, Ǖ, Ǘ, Ǚ, Ǜ, Ũ, Ủ, Ụ, Ừ, Ứ, Ữ, Ử, Ự, У --> 'U'
  49. ù, ú, û, ũ, ū, ŭ, ů, ű, ų, ư, ǔ, ǖ, ǘ, ǚ, ǜ, υ, ύ, ϋ, ủ, ụ, ừ, ứ, ữ, ử, ự, у --> 'u'
  50. Ƴ, Ɏ, Ỵ, Ẏ, Ӳ, Ӯ, Ў, Ý, Ÿ, Ŷ, Υ, Ύ, Ϋ, Ỳ, Ỹ, Ỷ, Ỵ, Й --> 'Y'
  51. ẙ, ʏ, ƴ, ɏ, ỵ, ẏ, ӳ, ӯ, ў, ý, ÿ, ŷ, ỳ, ỹ, ỷ, ỵ, й --> 'y'
  52. В --> 'V'
  53. в --> 'v'
  54. Ŵ --> 'W'
  55. ŵ --> 'w'
  56. Ź, Ż, Ž, Ζ, З --> 'Z'
  57. ź, ż, ž, ζ, з --> 'z'
  58. Æ, Ǽ --> 'AE'
  59. ß --> 'ss'
  60. ẞ --> 'SS'
  61. IJ --> 'IJ'
  62. ij --> 'ij'
  63. Π--> 'OE'
  64. ƒ --> 'f'
  65. ξ --> 'ks'
  66. π --> 'p'
  67. β --> 'v'
  68. μ --> 'm'
  69. ψ --> 'ps'
  70. Ё --> 'Yo'
  71. ё --> 'yo'
  72. Є --> 'Ye'
  73. є --> 'ye'
  74. Ї --> 'Yi'
  75. Ж --> 'Zh'
  76. ж --> 'zh'
  77. Х --> 'Kh'
  78. х --> 'kh'
  79. Ц --> 'Ts'
  80. ц --> 'ts'
  81. Ч --> 'Ch'
  82. ч --> 'ch'
  83. Ш --> 'Sh'
  84. ш --> 'sh'
  85. Щ --> 'Shch'
  86. щ --> 'shch'
  87. Ъ, ъ, Ь, ь --> ''
  88. Ю --> 'Yu'
  89. ю --> 'yu'
  90. Я --> 'Ya'
  91. я --> 'ya'

This awesome jQuery plugin is developed by lee-ratinan. For more Advanced Usages, please check the demo page or visit the official website.

  • Publication date: 02.07.2018
  • Source