[英]Change encoding (iconv in php) doesn't work
I have a database with data in windows-1253 encoding. 我有一个使用Windows-1253编码的数据的数据库。 I'm trying to convert them to utf8 with iconv function and display them in a page but I get characters like these: g óôçí åðüìåíç ôáéíßá ôïõ
我正在尝试使用iconv函数将其转换为utf8并将其显示在页面中,但是却出现如下字符:góôçíåðüìåíçôáéíßáôïõ
Any thoughts? 有什么想法吗?
This is the code I use 这是我使用的代码
iconv(mb_detect_encoding($this->row["question"], mb_detect_order(), true),"UTF-8",htmlentities(stripslashes($this->row["question"])))
如果您知道编码是Windows-1253,则只需尝试使用:
iconv('Windows-1253','UTF-8', $text);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.