Jump to content
JasperReports Library 7.0 is now available ×

non-latin1 texts in web app


Recommended Posts

By: tortois - tortois

non-latin1 texts in web app

2006-02-17 04:50

Hello,

 

I have created report with one variable on it.

Variable myVar is defined like this (it contains greek unicode text from jasperreports' unicode example):

 

<variable name="myVar" class="java.lang.String" resetType="Report" calculation="Nothing">

<variableExpression><![CDATA["greek text: u0393 u0394 u0398 u039B u039E u03A0 u03A3 u03A6 u03A8 u03A9" ]]></variableExpression>

<initialValueExpression><![CDATA["greek text: u0393 u0394 u0398 u039B u039E u03A0 u03A3 u03A6 u03A8 u03A9" ]]></initialValueExpression>

</variable>

 

Then variable is placed on report like:

 

<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

mode="Transparent"

x="131"

y="13"

width="232"

height="18"

forecolor="#000000"

backcolor="#FFFFFF"

key="textField"

stretchType="NoStretch"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>

<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single">

<font fontName="Arial" pdfFontName="Helvetica" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" />

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$V{myVar}]]></textFieldExpression>

</textField>

 

When previewing report locally (HTML) output looks as expected.

 

When running report in appserver context (via html.jsp from Webapp sample) gives not so much expected results (like: greek text: ? ? ? ? ? ? ? ? ? ?).

 

Problem seems to be releated to HTML only (PDF looks ok).

Anyone faced that problem? Is there solution to this? It seems something pretty strightforward, but...

How can I overcome this, so non-latin1 is generated on web as well as latin1?

 

Best regards,

tortois

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...