PHP日语字符串设置为? [英] PHP Japanese Strings getting set to?
问题描述
我有一个带有一个简单回显功能的PHP文件:
I have a PHP file with one simple echo function:
echo 'アクセスは撥ねりません。';
但是当我访问该页面时,我得到了:
but when I access that page i get this:
????????????
有人可以帮助我吗? 我也将页面编码设置为UTF-8,我知道这一点,因为我使用的所有浏览器都这样说. 我也在echo函数之前执行此操作:
Can someone help me? I also have my page encoding set to UTF-8, and I know it, because all of the browsers i used said so. I also do this before the echo function:
mb_internal_encoding('UTF-8');
这是做什么的? 对我有帮助吗? 我需要的是能够回显静态的日语字符串.
What does this do? Does it help me? All I need is to be able to echo a static Japanese string.
谢谢!
推荐答案
我明白了. 我只需要设置mbstring扩展名设置即可处理UTF-8中的内部字符串. Thas扩展是我构建的PHP 5.3.0的标准配置.
I got it. I just had to set the mbstring extension settings to handle internal strings in UTF-8. Thas extension is standard with my build of PHP 5.3.0.
这篇关于PHP日语字符串设置为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!