使用 UTF8 编码阿拉伯语 [英] Encoding arabic using UTF8
本文介绍了使用 UTF8 编码阿拉伯语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
目前我使用包含系统创建了一个简单的网站
Currently I created simple website using include system
header.php - 包含 HTML 页面的第一部分(头部、元标记、JS 代码等)
header.php - contains first part of HTML page (Head, meta tags, JS codes ... etc )
page.php - 包含简单的 php 代码
page.php - contains simple php code
我对阿拉伯语的主要问题
My main problem with arabic language
我必须把
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
在 page.php 中, 标签之间的 footer.php 否则阿拉伯文将无法正确支持.
in page.php, footer.php between <head>
tags otherwise the arabic will not support correctly.
由于这些标签,这会阻止页面验证.
This prevents page validation because of these tags.
有什么方法可以避免这个问题吗?
Is there any method to avoid this problem ?
谢谢
推荐答案
// Send a raw HTTP header
header ('Content-Type: text/html; charset=UTF-8');
// Declare encoding META tag, it causes browser to load the UTF-8 charset
// before displaying the page.
echo '<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />';
// Right to Left issue
echo '<body dir="rtl">';
这篇关于使用 UTF8 编码阿拉伯语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文