I’m extracting database data width jquery to build site content. The problem is: my hungarian characters get lost on the way from the server to the client. For example: “kosárlabda” becomes “Kos�rlabda” etc…
Setting the response headers with php doesn’t help (nor ISO-8859-2, nor UTF-8).
I have <?php header('charset=ISO-8859-2'); ?> on the top of my called files.
This is the method I use to load the data:
function load(type,values) {
$.get(type+".php", function(data) {
$("#data").html(data);
});
}
Thanks in advance.
I solved my problem:
All I needed was:
mysql_query("SET NAMES UTF-8");andmysql_query("SET CHARACTER SET 'utf8'");into all php filesAddDefaultCharset UTF-8to the .htaccess file.