strtolower() 用于 unicode/多字节字符串 [英] strtolower() for unicode/multibyte strings
本文介绍了strtolower() 用于 unicode/多字节字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的页面中有一些非英语/外语文本,但是当我尝试将其设为小写时,它的字符被转换为包含问号的黑色菱形.
I have some text in a non-English/foreign language in my page, but when I try to make it lowercase, it characters are converted into black diamonds containing question marks.
$a = "Երկիր Ավելացնել";
echo $b = strtolower($a);
//returns ����� ���������
我已经在元标记中设置了我的字符集,但这并没有解决它.
I've set my charset in a metatag, but this didn't fix it.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
如何在不破坏字符串的情况下将字符串转换为小写?
What can I do to convert my string to lowercase without corrupting it?
推荐答案
您是否尝试过使用 mb_strtolower()?
have your tried using mb_strtolower()?
这篇关于strtolower() 用于 unicode/多字节字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文