我正在使用 Struts 2,需要 i18n,我创建了 global & global_ar 属性文件,对于英语,所有字符都正确显示,之前我将所有阿拉伯文本转换为 UTF-8 代码,时间应用程序运行良好,但是当我将其更改为纯阿拉伯文本时,它停止工作,在阿拉伯文本浏览器中显示一些奇怪的字符。
JSP 文件
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="t" tagdir="/WEB-INF/tags/custom_tag"%>
<t:template>
<s:form action="visitations.action" id="visitationForm" theme="simple" method="post"> </s:form>
<s:text name="country" />:<span class="required">*</span>
</t:template>