PDF cannot display the correct charset even utf8 was set at html meta tag

  • 0_1510616876330_Capture.PNG

    Even though I have already added the following tag at template, the generated pdf (as shown) cannot display the charset properly. I m using linux with both locale set to LANG=zh_TW.utf8 and LC_ALL=zh_TW.utf8 as well. Do you have any idea?

    {#asset Invoice styles.css @encoding=utf8}
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">

  • administrators

    i think the meta tag should be the first thing to appear in the html, or maybe you are trying to use some font that is not available on linux, what kind of font is it? or these squares just appears when trying to render some utf8 characters? what are those special characters?

    can you try to render the same template in playground and then share here the link? (playground uses windows)

  • the squares are chinese character.

  • administrators

    i see, we have seen this before on linux machines. we ended up installing some fonts packages and the issue was solved. maybe installing some of these packages can solve the problem for you too.

    (full list of font packages that we installed)

    apt-get install -y fonts-dejavu-core fonts-dejavu-extra fonts-droid-fallback fonts-guru fonts-guru-extra fonts-horai-umefont fonts-kacst fonts-kacst-one fonts-khmeros-core fonts-lao fonts-liberation fonts-lklug-sinhala fonts-lohit-guru fonts-nanum fonts-noto-cjk fonts-opensymbol fonts-roboto fonts-roboto-hinted fonts-sil-abyssinica fonts-sil-padauk fonts-stix fonts-symbola fonts-takao-pgothic fonts-thai-tlwg fonts-tibetan-machine fonts-tlwg-garuda fonts-tlwg-kinnari fonts-tlwg-laksaman fonts-tlwg-loma fonts-tlwg-mono fonts-tlwg-norasi fonts-tlwg-purisa fonts-tlwg-sawasdee fonts-tlwg-typewriter fonts-tlwg-typist fonts-tlwg-typo fonts-tlwg-umpush fonts-tlwg-waree fonts-unfonts-core

  • Dear @bjrmatos
    How about Debian and Centos ?
    I'm facing JSREPORT generate &nbsp become Â

Log in to reply

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