how to escape special characters in jasperreports ?
I want to escape special characters like :- é, â, è, ^, @ in jasper reports, so is there any way we can escape this characters ?
how to escape special characters in jasperreports ?
I want to escape special characters like :- é, â, è, ^, @ in jasper reports, so is there any way we can escape this characters ?
Try this:
etc.
If you want to escape special XML characters like <, >
you can use CDATA:
<staticText>
<reportElement x="0" y="0" width="100" height="14"/>
<textElement/>
<text><![CDATA[This is a test:< ]]></text>
</staticText>
Special characters like é, â, è
should work great if you specify the character encoding at the beginning of the jrxml file and encode the file correctly.
<?xml version="1.0" encoding="UTF-8"?>
If the exported report shows invalid characters you should check the jasper export. For instance for pdf export can find info here.