Jasper report in displaying arabic

2019-08-15 21:45发布

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条回答
相关推荐>>
2楼-- · 2019-08-15 22:38

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

查看更多
登录 后发表回答