German Characters

By: elmar weber - elmar_weber
German Characters
2002-09-08 12:07
Hello,

which unicode must I use, if I would like to use German character encoding in jasper reports?

If I compile a report xml file with German character (hope you know them) an error occurs:
Parse Fatal Error at line 528 column 27: An invalid XML character (Unicode: 0x1b8d25) was found in the element content of the document.
(the character is used in a static text element)
How can i solve this?


Elmar Weber



By: Teodor Danciu - teodord
RE: German Characters
2002-09-08 23:59

Hi,

Use this header for your XML files:

<?xml version="1.0"? encoding="ISO-8859-1">

Here is a description of the Latin1 encoding.

http://wwwwbs.cs.tu-berlin.de/~czyborra/charsets/#ISO-8859-1

I hope this helps.
Teodor



By: elmar weber - elmar_weber
RE: German Characters
2002-09-09 06:05
Hello,

thanks, it works partly. In static text it works, but if I retrieve german characters from a database and fill the report with them, they are not printed as german characters, for example:
    

is printed as

  ?

(if the forum doesnt convert the charaters correct check: http://www.sniper-lan.de/gchars.html)


any idea how to fix that?

Elmar Weber



By: Teodor Danciu - teodord
RE: German Characters
2002-09-09 07:25

Hi,

Is this a PDF or a JasperViewer problem?

Thank you,
Teodor



By: elmar weber - elmar_weber
RE: German Characters
2002-09-09 07:47
Hello,

JasperPrintManager, Viewer etc..



Elmar Weber


By: elmar weber - elmar_weber
RE: German Characters
2002-09-09 08:28
Hello again,

here an example:
<textField>
<reportElement positionType="Float" isPrintRepeatedValues="false" x="55" y="0" width="250" height="20"/>
<textFieldExpression class="java.lang.String">$F{name}</textFieldExpression>
</textField>


even if i use following code (replacing the characters shown with the ones which should be there) it doesnt work:
<textField>
<reportElement positionType="Float" isPrintRepeatedValues="false" x="55" y="0" width="250" height="20"/>
<textFieldExpression class="java.lang.String">$F{name}.replace (' ', ' ')</textFieldExpression>
</textField>

(the code was just a try, it is printed the same data as before)

Elmar Weber
2001 JI Open Discussion's picture
Joined: Aug 10 2006 - 3:26am
Last seen: 16 years 10 months ago

0 Answers:

No answers yet
Feedback
randomness