Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Unicode step by step solution in Clear category for Remove Accents by roman.xlsm
def checkio(in_string):
import unicodedata
string = unicodedata.normalize('NFD', in_string)
res = []
for st in string:
if unicodedata.category(st) != 'Mn':
res.append(st)
return ''.join(res)
#These "asserts" using only for self-checking and not necessary for auto-testing
if __name__ == '__main__':
assert checkio(u"préfèrent") == u"preferent"
assert checkio(u"loài trăn lớn") == u"loai tran lon"
print('Done')
Nov. 19, 2021
Comments: