I have a python notebook and using graphviz for making a graph I get all characters showing correctly on VS Code, but on github all latin and chinese characters show incorrectly like this:
I know the problem is on the encoding, but it's related to the graphviz library. I don't have problems showing special characters on strings or other graphs.
This is my code:
from graphviz import Digraph
h = Digraph("Shu")
h.attr(rankdir="LR",fontname="verdana")
with h.subgraph(name='cluster_wu') as c:
c.attr(label='5 Shu antigos 五輸穴', style='rounded,filled', color='blanchedalmond')
c.node_attr.update(style='filled', color='white')
c.node('a1','Poço\n井穴', color='white')
c.node('a2',"Manancial\n滎穴", color='lightgray')
c.node('a3',"Riacho\n輸穴", color='darkgray')
c.node('a4',"Rio\n經穴", color='gray40')
c.node('a5',"Mar\n合穴", color='gray20', fontcolor='white')
c.edges([('a1', 'a2'), ('a2', 'a3'), ('a3', 'a4'), ('a4', 'a5')])
h
I tried declaring UTF8 with no luck:
# -*- coding: utf-8 -*-
Thanks for any help I can get.