在 PHP 中运行 sql 查询时处理 ÆØÅ(挪威字符)时出现问题


Problems with handling ÆØÅ (Norwegian characters) when running a sql query in PHP

我有一个无法理解的问题。

我的网站运行顺利,但是当使用挪威语特殊字母时,查询无法在我的数据库中添加新行。Dreamweaver 和 PHPMyAdmin 中的文档都设置为拉丁文/ISO-8859-1,因此理论上应该可以正常工作。通过 PHPMyadmin 手动编辑数据库时,每个字符都显示正常。没有损坏的字母或问号。

我的查询非常标准。

mysqli_query($con,"INSERT INTO customers (w_id, firstname, lastname, email, company, tlf, adress, city, zipcode, country)
     VALUES ('$webshop_info[w_id]', '$firstname', '$lastname', '$email', '$company', '$tlf', '$adress', '$city', '$zipcode', '$country')");

有什么想法、建议或解决方法吗?

问题出在字符集中
的某个地方1.php版本不合适
2. HTML 中的字符集元未设置
3. 数据库排序规则错误


请尝试 unicode。