English 中文(简体)
匈牙利特征在从数据库中装载时发生。
原标题:Hungarian characters gone when loading from database

I m 提取数据库数据,为建立网站内容而 w忙。 问题在于:从服务器到客户的路途上,我才失去智慧。 例如,“Ksárlabda”成为“Kos rlabda”等。

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.

这是我用来装载数据的方法:

function load(type,values) {
    $.get(type+".php", function(data) {
        $("#data").html(data);
    });
}

提前感谢。

最佳回答

我解决了我的问题:

我所需要的是:

  • putting mysql_query("SET NAMES UTF-8"); and mysql_query("SET CHARACTER SET utf8 "); into all php files
  • adding an AddDefaultCharset UTF-8 to the .htaccess file.
问题回答

暂无回答




相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Virtual Tour using sketch up, ajax, flash technologies

I want to know if there are existing technology that make your 3d models in sketch into virtual tours, using either Ajax or Flash for web presentation. If there s none, which will be a good approach ...

How can i update div continuously

I have asp.net application where i have a div which showing the value from other site. The value of that site is changing continuously. I want that my div will automatically update in some interval ...

热门标签