Open kovloq opened 8 years ago
Can you include some of the Japanese characters so I could try and reproduce this?
My first thought is maybe the system you are generating the files on may not have Japanese fonts installed.
It's Japanese Yen symbol ¥. I was trying to make a sales report in my e-commerce website. Thank you for your advise. I will try to find it out using your suggestion.
I had a same your problem and i took a lot of times to find it, but i solved it successfully. Your problem is missing Japanese fonts. And i think you should do as follow:
Step1: wget http://dl.ipafont.ipa.go.jp/IPAexfont/IPAexfont00301.zip
Step2: unzip IPAexfont00301.zip
Step3: ls -l IPAexfont00301/*ttf
Step4: mkdir -p /usr/share/fonts/japanese/TrueType
Step5: mv -i IPAexfont00301/*ttf /usr/share/fonts/japanese/TrueType/
Step6: ls -l /usr/share/fonts/japanese/TrueType/
Step7: fc-cache -fv
Step8: fc-list | grep IPA
Step9: Restart rails server
and see the result
Here is document: http://qiita.com/metheglin/items/bb88aa25eae250bfa2a2#3-1
And link to download Japanese fonts: http://ipafont.ipa.go.jp/node26#jp
@khanhpham1990
This URL http://dl.ipafont.ipa.go.jp/IPAexfont/IPAexfont00301.zip
is not working anymore. Therefore, we need to use this one wget https://oscdl.ipa.go.jp/IPAexfont/IPAexfont00301.zip
.
Hi,
I am having the problem of displaying Japanese characters in my pdf. It displays very well in the view files. I am using pdf_from_string command from wicked pdf. I've tried adding
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
in my view files but still doesn't workMoreover, I also added
:encoding => 'UTF-8'
In the optionsHere is the code Controller
View