0

In my tabel I have this special character for example "č"

When I select and display this data as html on my website it shows that character as a question mark (?).

How could I solve this?

Example Table

Mehanički

Example HTML output

Mehani?ki

Im using PHP to get the data from SQL and I call the PHP file with AJAX to get the output which is an array

4

3 回答 3

1

放入<meta charset="utf-8">你的头块。

此外,您的数据库的排序规则应该是 utf8_unicode_ci。

此外,您的源代码也应该以 utf8 编码。

于 2013-06-27T01:40:27.633 回答
0

I guess you have to set your html encoding to that one you use in the database.

于 2013-06-27T01:01:10.160 回答
0

我必须在连接到我的数据库后把它

if (!$mysqli->set_charset("latin2")) {
    printf("Error loading character set latin2 : %s\n", $mysqli->error);
}
于 2013-06-27T02:01:46.467 回答