Remove/normalize Javascript/Jquery 中的口音
Remove/normalize accents in Javascript/Jquery
我正在尝试从葡萄牙语字符串中删除重音符号,并且我找到了类似于 Remove accents/diacritics in a string in JavaScript but it seems a bit 'ugly'. Isn't any library in JS/Jquery that can make this work for you? In Java you have for instance the class Normalizer http://docs.oracle.com/javase/7/docs/api/java/text/Normalizer.html
中提供的解决方案
刚找到这个图书馆https://github.com/dundalek/latinize
我还没有完全研究代码,但它似乎有效
我正在尝试从葡萄牙语字符串中删除重音符号,并且我找到了类似于 Remove accents/diacritics in a string in JavaScript but it seems a bit 'ugly'. Isn't any library in JS/Jquery that can make this work for you? In Java you have for instance the class Normalizer http://docs.oracle.com/javase/7/docs/api/java/text/Normalizer.html
中提供的解决方案刚找到这个图书馆https://github.com/dundalek/latinize
我还没有完全研究代码,但它似乎有效