-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraphViz::parse_string and unicode lables #115
Comments
Same issue here but with swedish characters. Any progress? As far as I can tell GraphViz supports unicode so I guess it is called in the wrong way somehow. |
aah - thanks for posting! We have a dot file already that is generated from another source so maybe we should try to just pass it directly to |
@froderik it does work with russian so I think it'll do so with swedish too =) system('dot /path/to/dot/file.dot -Tsvg -o /path/to/output/file.svg') But you will probably need to handle all posible errors from dot command (I believe in this gem they handle errors here with just raising Also Ruby-Graphviz gem is quite heavy and I guess it'll be beter not to use it if your use cases are as simple as just format simple graph to dot or convert dot to image |
great! will try it right away! |
@vizvamitra - works like a charm - thanks for the help! |
Any update about this? I got a similar issue with script as the following require "graphviz"
g = GraphViz::new( "G" )
g.add_nodes "chinese", label: '你好'
g.output( :dot => "x.dot" ) would generate
and will generate |
It's platform-related issue. c:\script>ruby test.rb
"\u4F60\u597D"
[user@i2 ~]$ ruby test.rb
"你好" |
The problem is in lib/graphviz/utils.rb:46 |
this worked for me: |
This issue is still present in 2021 when labels have UTF-8 character codes, in our case French names with é character. |
When producing a SVG using -Tsvg, binode should be |
…ould be false when the command produces text
PR submitted - not sure if anyone is listening though. To contributors: Thank you for your consideration on my PR and for supporting this great gem. |
I've found some strange behavior:
(ruby 2.0.0p353, ruby-graphviz 1.2.2, graphviz 2.36.0)
The text was updated successfully, but these errors were encountered: