UTF-8 Character set CentOS PHP

谁说胖子不能爱 提交于 2020-01-25 07:14:06

问题


I've a problem with the utf-8, I'm trying to show russian characters over my page, but I'm getting ???? instead of those russian characters.

I tried to modify .htaccess like AddDefaultCharset UTF-8 but didn't work.

I also observed that when I try to show characters using .html extension (no php) it works fine, but with the php file is shows ?????.

server details

php 5.3.16
centos release 6.3

I've similar problem as here

http://remository.com/forum/func,view/id,18483/catid,24/

Thanks


回答1:


adding these lines in main php.ini worked for me

default_charset = "utf-8"
mbstring.internal_encoding=utf-8
mbstring.http_output=UTF-8
mbstring.encoding_translation=On
mbstring.func_overload=6


来源:https://stackoverflow.com/questions/13104615/utf-8-character-set-centos-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!