I have a problem when user input a string in special Unicode like and my system cannot distinguish it with the string "tuyendung" that is written in ASCII. The question is how can I normalize the input string to ASCII before storing it in the database?
Sample Input:
(Char code: 0xd835, 0xde01, 0xd835, 0xde02, 0xd835, 0xde06, 0xd835, 0xddf2, 0xd835, 0xddfb, 0xd835, 0xddf1, 0xd835, 0xde02, 0xd835, 0xddfb, 0xd835, 0xddf4)
Expected output:
tuyendung
(Char code: 0x74, 0x75, 0x79, 0x65, 0x6e, 0x64, 0x75, 0x6e, 0x67)