[xwiki-users] German letters changed to ? by pdf export

Sergiu Dumitriu sergiu at xwiki.com
Thu Dec 13 10:35:56 CET 2007


Jan Kodera wrote:
> Hi,
>  i think, that problem is in class which generate PDFs. In the class is 
> preset to encoding latin-1.
>   The problem is in this line 
>   tidy.setCharEncoding(Configuration.LATIN1);
>  in  PdfExportImpl class.
> So only solution is change this line and recompile the xwiki. Or maybe 
> compile only this class and change struts action to your new file.
> 

Hi,

That line doesn't exist in recent versions of the code, so the fix above 
works if you are using a pre-1.1 xwiki. For newer versions instead, you 
should make sure the encoding is properly set. For the moment, it is a 
bit difficult to do that. Since german characters are part of the latin1 
(iso8859-1) encoding, they should work out of the box, so this means 
that one of the following is not configured properly:

- the encoding in WEB-INF/web.xml
- the encoding in WEB-INF/xwiki.cfg
- the java vm encoding. This is a bit harder to configure; for Tomcat, 
you should add " -Dfile.encoding=iso-8859-1 " to the CATALINA_OPTS 
variable in $tomcat_dir$/bin/catalina.sh

Sergiu

> Jan
>  
> On 12/12/07, *Roman Anastasini* <ranastasini at adlinkgroup.net 
> <mailto:ranastasini at adlinkgroup.net>> wrote:
> 
>     Hi there,
> 
>      
> 
>     Unfortunately e have a little problem with the export to a pdf file
>     out of our xwiki.
> 
>     Some German letters (e.g.: ö, ä, ß) are printed to ? when generating
>     a pdf.
> 
>     Does anybody know how to solve the this?
> 
>      
> 
>     Looking forward for helpfully answers.
> 
>     Thanks a lot!
> 
>      
> 


More information about the users mailing list