Hi.
I am rendering af URL and have problems with characters like æ, ø, å which is shown as '?'.
How do I solve the character problem?
My HTML page is declared with the meta tag:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
The pd4ml debug looks like:
version: PD4ML 371b9 (eval)
using content encoding from HTTP header: iso-8859-1
new parse attempt with: UTF8
done in 240ms.
In the PD4ML code I use the code:
Code:
...
PD4ML html = new PD4ML();
html.overrideDocumentEncoding("iso-8859-1");
html.enableDebugInfo();
response.setContentType("application/pdf");
response.setHeader("Content-disposition","inline; filename="+fileName+".pdf");
InputStreamReader isr = new InputStreamReader(connection.getInputStream());
ByteArrayOutputStream baos = new ByteArrayOutputStream();
html.render( url, baos );
byte[] result = baos.toByteArray();
response.setContentLength(result.length);
ServletOutputStream sos = response.getOutputStream();
sos.write( result );