Commit 36c61ec2 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

graphviz_draw(): fix encoding bug

This fixes issue #687
parent 4908e139
Pipeline #877 passed with stage
in 108 minutes
......@@ -91,12 +91,12 @@ except OSError:
def htmlize(elem, val):
if len(val) >= 2 and val[0] == "<" and val[-1] == ">":
g = libgv.agraphof(elem)
return ctypes.string_at(libgv.agstrdup_html(g, str(val[1:-1]).encode("utf8")))
return ctypes.string_at(libgv.agstrdup_html(g, str(val[1:-1]).encode("utf8"))).decode("utf8")
return val
def aset(elem, attr, value):
v = htmlize(elem, str(value))
v = htmlize(elem, str(value)).encode("utf8")
libgv.agsafeset(elem, str(attr).encode("utf8"), v, v)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment