Japanese characters rendering incorrectly in jsreport online
I'm experiencing a problem where japanese characters are not displayed correctly and instead, show as empty boxes in rendered reports. Some details:
- I'm using jsreport online
- phantom-pdf recipe
- phantomjs version 1.9.8
I've also included a
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">element inside the head-tag of the document.
When I changed the phantomjs version to 1.9.8-windows the japanese characters render just fine but also the layout looks a bit different which isn't desirable. Any way of getting the linux version to support this? Thanks!
it looks we'll need to install some additional font packages to the linux based phantom-pdf container.
Do you have some special html you can share so we can test it? Or something like this is enough?
<html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> </head> <body> 昨夜のコンサートは最高でした。 </body> </html>
Thanks for your quick reply and help! Yep, the example you provided seems to have the exact same problem.
This is how it shows in jsreports online:
hmm weird, i'm rendering the same content in jsreportonline and it is rendering fine.
@Samuli-Haverinen can you try again and see if it is still a problem?
@bjrmatos Don't you render it in windows phantomjs? I guess yes. The problem is only in linux containers. Try to run it in debug and you will likely see a windows looking path in the output.
I was able to replicate this and fixed it in this commit
I believe we just need to release it.
yes, i was using the linux container in the screenshot, but even weird now i'm trying again and i can see the empty boxes 😬
Any update on when the fix is released?
We will try to schedule it for the next week.
We need to check first if it won't affect the existing templates.
The mentioned update has now reached jsreportonline. You should be able to use the Japanese font there.
Thanks, that seems to work perfectly now!
Great, thank you for the confirmation.