molily: Unicode escape Sequenz in Strings umwandeln

Beitrag lesen

Wie kann ich nun alle solche Escape-Sequenzen in Unicode-Zeichen umwandeln?

var string = "\\u00C4";  
var newstring = string.[ref:self812;javascript/objekte/string.htm#replace@title=replace](  
  /\\u([0-9a-fA-F]{4})/,  
  function (match, submatch) {  
    return String.[ref:self812;javascript/objekte/string.htm#from_char_code@title=fromCharCode]([ref:self812;javascript/objekte/unabhaengig.htm#parse_int@title=parseInt](submatch, 16));  
  }  
);

Mathias