我有一个聊天框,显示这样的聊天
用户名:我的聊天消息
用户名2:聊天消息
但是当有人在他的用户名上注册使用希伯来字符时,他在我们的聊天框上发帖时显示不正确.它会显示如下
תירבע:12345
用户名:我的聊天消息
用户名2:聊天消息
这只会在他发布数字时发生.示例HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Chatbox</title></head>
<body>
<div><span><a target="_BLANK" style="" href="#">תירבע</a>:</span><span>12345</span></div>
<div><span><a target="_BLANK" style="" href="#">תירבע</a>:</span><span>this is not numbers so it is displayed correctly</span></div>
<div><span><a target="_BLANK" style="" href="#">Username1</a>:</span><span>message1</span></div>
<div><span><a target="_BLANK" style="" href="#">Useraname2</a>:</span><span>message2</span></div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
而这个的输出就是这个
?????:12345
?????:this is not numbers so it is displayed correctly
Username1:message1
Useraname2:message2
Run Code Online (Sandbox Code Playgroud)
如何正确显示以便首先显示用户名?
| 归档时间: |
|
| 查看次数: |
2449 次 |
| 最近记录: |