matomoのレポート文字化け対策

iphone

matomoから毎日レポートが送られてきますが,その中の日本語がトウフになっています.その解消方法を説明します.結論から言うと日本語フォントをインストールするだけで解決します.

以下のシェルを実行します.これは,matomoをアップグレードするたびに実行してください.

#!/bin/sh

MATOMO=/var/www/vhost/matomo.yo7612.com/piwik
#cp NotoSans-Light.ttf /var/www/html/matomo/plugins/ImageGraph/fonts/unifont.ttf
#cp YUMINDB.TTF /var/www/html/matomo/plugins/ImageGraph/fonts/unifont.ttf
#cp YUGOTHIC.TTF /var/www/html/matomo/plugins/ImageGraph/fonts/unifont.ttf
#cp unifont.ttf /var/www/html/matomo/plugins/ImageGraph/fonts/unifont.ttf
#chown apache.apache /var/www/html/matomo/plugins/ImageGraph/fonts/*.ttf
#ls -l /var/www/html/matomo/plugins/ImageGraph/fonts/

cp YUGOTHIC.TTF ${MATOMO}/plugins/ImageGraph/fonts/unifont.ttf
chown apache.apache ${MATOMO}/plugins/ImageGraph/fonts/*.ttf
ls -l ${MATOMO}/plugins/ImageGraph/fonts/

systemctl restart httpd

コメント

タイトルとURLをコピーしました