Hi,
i’m using the following java script code to replace characters:
var chars = {'ß':'ss','&':'und','.':'','ö':'oe','ä':'ae','ü':'ue','é':'e','è':'e','Ö':'Oe','Ä':'Ae','Ü':'Ue','É':'E','È':'E'};
var nachname = (record.getFieldValue('fld-eef248f9679f47eb98598b22133da6ea').toString().replace(/[ß&.öÖäÄüÜéÉèÈ]/g, m => chars[m])).toString().replace(/\s/g, '%20');
Nothing is replaced with this code.
Adding for example UTF-16 code for character ‘ü’ -> ‘\\u00fc’ to the second variable string:
var chars = {'ß':'ss','&':'und','.':'','ö':'oe','ä':'ae','ü':'ue','é':'e','è':'e','Ö':'Oe','Ä':'Ae','Ü':'Ue','É':'E','È':'E'};
var nachname = (record.getFieldValue('fld-eef248f9679f47eb98598b22133da6ea').toString().replace(/[ß&.öÖäÄüÜéÉèÈ\\u00fc]/g, m => chars[m])).toString().replace(/\s/g, '%20');
leads for for example with the text “Stümper” to
‘Stundefinedmper’
Even if i add the UTF-16 code to the first variable, results to the same undefined issue.
Does anyone have an short idea to solve that?
Thanks
Chris