Jasper report in displaying arabic

杀马特。学长 韩版系。学妹 提交于 2019-12-11 11:49:01

问题


This is my xml tag for jasper

<textField>
    <reportElement x="56" y="0" width="276" height="20" uuid="952b2fc3-7220-40ed-80eb-e2a3b9fd9fe2"/>
    <textElement>
        <font fontName="DejaVu Sans" pdfFontName="Courier" pdfEncoding="Cp1256" isPdfEmbedded="true"/>
    </textElement>
    <textFieldExpression><![CDATA[new String($F{TEST}.getBytes(), "UTF-8")]]></textFieldExpression>
</textField>

Input:

واحد مائة أَلْفٌ درهم اماراتي

Output: واحد مائة ?? درهم اماراتي

We can see two question marks in place of arabic character that stands for 1000.

How to display this?
Where I am wrong?


回答1:


I only use Arial Unicode to handle Arabic. I see you are using DejaVu Sans.



来源:https://stackoverflow.com/questions/32265647/jasper-report-in-displaying-arabic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!