Reputation: 21015
When making an AJAX call from the client, the server responds with Hebrew text. The PHP page that returns the result is in Windows-1255. For some reason, the result encoding is not Windows-1255, and all I see is gibberish instead of Hebrew. The result purposely contains HTML tags.
I've tried urlencoding, base64 encoding, nothing works.
Thanks!
Upvotes: 0
Views: 4124
Reputation:
you should also not use the string from get data, create a new srting...
Upvotes: 1
Reputation: 21015
all i needed to do is put this in the respone php file
header('Content-Type: text/html; charset=windows-1255');
10x everyone!!!
Upvotes: 2
Reputation: 11469
beware: AJAX works only with UTF8, so be sure to convert characters before sending them, otherwise you can get mangled characters in Javascript.
Upvotes: 1
Reputation: 75983
Can't you change it so that the server return UTF-8 instead of 1255?
There's absolutely no reason these days to continue using ANSI.
Upvotes: 4