Hi everyone,
I have created a bot that retrieves e-mails with the Microsoft Graph API. However, the result must be properly encoded using unicode. For example the letter “è” is U+00E8 and if I don’t correct it, the word “règlement” appears as “ru00e8glement“
I have used the javascript component, to run this function :
function decodeUnicode(str) {
return str.replace(/\\ut\dA-F]{4}/gi, function(match) {
return String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16));
});
}
However, it is particularly slow.
If I run this script on a batch of 100 e-mails, it takes roughly two minutes. In my opinion, it is not an acceptable duration. Is there a way to optimize that ?