zhangjingren / java-html2image

Automatically exported from code.google.com/p/java-html2image
0 stars 0 forks source link

utf 8 chars are not well rendered #21

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create a servlet on tomcat and a servlet use htmlimagegenerator
2. use html as below:

HtmlImageGenerator imageGenerator = new  HtmlImageGenerator();
imageGenerator.loadHtml(html);
return imageGenerator.getBufferedImage();
3.  the image generated has not utf 8 chars but contains [][][][] instead of 
arabic chars

What is the expected output?
arabic chars
What do you see instead?
[][][][][]

i think depends on tomcat setting, but i set tomcat to manage utf8
and as well request and response servlet are utf 8 set as follows:
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html; charset=UTF-8");

What version of the product are you using? 0.9 version
On what operating system?  unix

Please provide any additional information below.

Original issue reported on code.google.com by g.dilemb...@gmail.com on 6 Aug 2014 at 7:07