Forum Discussion
How can I print Japanese Characters via Python Visual?
- 6 years ago
iamriz ,
This is not the issue in power bi, if you create a dataframe and run the code this issue also occurs. You may haven't configured the matplotlibrc, please download the .ttf font file and move the file to matplotlib/mpl-data/fonts/ttf then configure font.family, font.sans-serif and axes.unicode_minus like below:
font.family : sans-serif font.sans-serif : add the ttf file name here axes.unicode_minus : FalseFinally run code below to reload the python environment:
from matplotlib.font_manager import _rebuild _rebuild() #reload一下Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
iamriz ,
Refer, if this can help https://docs.python.org/3/howto/unicode.html
Hi amitchandak , I already tried str.encode() which returns b'\xe9\xa1\xa7\xe5\xae\xa2\xe5\x90\x8d', then when I decode it again, it will print the rectangle(garbage) characters. Actually, I thought that I do not need encoding and decoding because in Power BI data model, the JP characters perfectly show in utf-8 format. But I don't understand why it doesnt show up properly with Python Visual. Any advice?