I've made a script for escaping Windows-1250 characters. You can create a translation table by yourself or generate from Wikipedia with a translation table generation script I used. The script should work at least on IE 7, FF 3.6 and Opera 11 (haven't tested on other browsers).
Example code for jQuery:
var sBaseUrl = 'ajax.script.php';
var oData = {
some_param : 'Zażółć gęślą jaźń',
other_param : '1',
};
// build url
var url = localBuildURL(sBaseUrl, oData);
// get
$.ajax({
url: url,
dataType: 'text', // JSON doesn't always parse...
success: function(txt, status, xhr)
{
// do something with txt
// or parse with: data = $.parseJSON(txt);
}
});
Edit: Actually... No translation table is needed for ISO-8591-1. All characters in it are one byte only. The escape
function should be sufficient.