Discord allows users and servers to have basically any name with unicode, emojis, etc. I don't need a solution to fix all names but I need to "normalize" as many unicode as I can. I have tried solutions on here but, for some reason, the unicode is simply not being converted. This is what I have right now. I need something like ' ' to become 'Baka Gang'
function unicodeToChar(unicode) {
const arr = [];
for (const char of unicode) {
arr.push(char);
}
const newWord = [];
arr.forEach(letter => newWord.push(String.fromCharCode(parseInt(letter))));
return newWord.join('');
}