@verheiratet1952:
1.) why replace those chars in first place? your OS should not have problem with unicode chars
2.) a simple test with alert will show you that your way to replace the chars doesn't work
see mathiasbynens.be/notes/javascript-unicode
Easiest way to have the correct unicode character is to copy/paste the chars from the original string, then you would have seen that
works fine because it's a different unicode character that you have in your script. script working fine with correct map