UTF8 Text in JSON Data



  • Hello! Great product!

    I am using the cloud service via the API. I have some special characters in my JSON, for example:

    { "data": { "name": "Divinityᴴᴰᴾ® Mist 24in x 24in" } }
    

    But it does not render correctly in the PDF.

    0_1666747587802_Screen Shot 2022-10-25 at 6.24.55 PM.png

    If I try to set Content-Encoding: utf8 I get an error.

    How can I fix this?

    Thank you!



  • That's a problem of the client handling or chrome missing some fonts for pdf rendering.
    If you render with html recipe? Does this work?

    Here you can see there are no issues with postman for example
    0_1666786703909_upload-ba41dad5-6327-4b0b-be0b-62426ab28626



  • Rendering with the html recipe works fine. How do I get it to work with chrome-pdf? It doesn't seem to matter which font I use. The font does change in the PDF correctly, but the encoding is wrong.



  • Fixed!

    For anyone lurking, adding this line to the top of the template fixes it:

    <meta charset="UTF-8">
    

Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.