Let's say a request comes back from the server with ø in the response (which is gzip encoded because it is an AJAX call). A quick and dirty way to decode this entity in javascript is:
var encodedText = 'Gøøøse'
var temp = document.createElement('span');
temp.innerHTML = encodedText;
var decodedText = temp.innerHTML;
temp = null;
this will set decodedText to: 'Gøøøse'
Friday, August 14, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment