I really need your help with this.
I’d like to be able to compare a string against an array and use it to replace special Unicode codes.
var unicode_dictionary = {
"\00E9": "é",
"\00E0": "à"
}
var old_str = "rapport couvrant une p\00E9riode de 6 mois (f\00E9vrier \00E0 juillet)"
if (\CODE match from the unicode_dictionary is found in the old_str) { then
replace every single instance of the \CODE with the corresponding
character resulting in the new string:
var new_str = "rapport couvrant une période de 6 mois (février à juillet)"
}
I am really lost with this as my DB outputs unicode characters in the \0000 format. How do I make a custom replace function like the above