java-html2image icon indicating copy to clipboard operation
java-html2image copied to clipboard

utf 8 chars are not well rendered

Open GoogleCodeExporter opened this issue 10 years ago • 2 comments

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 [email protected] on 6 Aug 2014 at 7:07

GoogleCodeExporter avatar Jun 10 '15 11:06 GoogleCodeExporter

did you solve problem? same issue

syncwt avatar Nov 28 '17 03:11 syncwt

Nope haven't had to much time to look at this library. But if you would like to - a PR would be appreciated

hkirk avatar Nov 28 '17 06:11 hkirk