I've had GWT, ext-GWT web-project in utf-8 charset. I've also add utf-8 charset in html file.
Additionally I need to create some pdf report. So that I wrote a special servlet, which take a template html-file, add some information (in local language) and convert a new generated html-file to pdf-file with wkhtmltopdf.
Now, when I try to convert that generated html-file (which also had <meta charset="UTF-8">
) to pdf-file, information with local language (some Strings), which I send from client code to servlet is replacing in the result pdf-file with "?" symbol in a black rhomb.
To solve this problem I add some parameters to Process Builder such as "--encoding"
"utf-8"
:
private void ConvertHTMLtoPDF(String sConvertationProgramm, String sHTML, String sPDF)
{
try {
ProcessBuilder pb = new ProcessBuilder(sConvertationProgramm, "--encoding", "utf-8", sHTML, sPDF);
Process process = pb.start();
process.waitFor();
} catch (Exception e) {
e.printStackTrace();
}
}
but all the same, there is no effect at all. At the same time I have those symbols only on tomcat server, without same trouble at jetty.
So, Where is the problem, on the sending local information to the server (cause another information in a local language from template html-file is showed correctly) or when it's writing/converting at the server side?
Does anyone has any suggestions? Thanks