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

Special Characters: Results in syntax error #14

Closed
lenntt opened this Issue Feb 28, 2013 · 3 comments

Comments

4 participants
@lenntt

lenntt commented Feb 28, 2013

When I have the following dot code (with setting charset or leaving it default to utf8):

      digraph full_graph {
         graph [charset="latin1"];
         0 -> 1 [label="éñॐ턞鸽V000_000"];
      }

Then Viz.js rendering does not render the edge and shows an error:

Error: :3: syntax error near line 3

While running graphviz from the command line by:

    dot -Tsvg graph.dot -o test.svg -v

I get the svg I expected.

There's probably not a simple fix for this (or has emscripten some build-in magic??), but though you should know.

@mdaines

This comment has been minimized.

Show comment
Hide comment
@mdaines

mdaines Mar 1, 2013

Owner

I'm not sure if there's a simple fix, but for some special characters it is possible to use HTML entities. I am using • and → in Grammophone, for example.

Owner

mdaines commented Mar 1, 2013

I'm not sure if there's a simple fix, but for some special characters it is possible to use HTML entities. I am using • and → in Grammophone, for example.

@succeun

This comment has been minimized.

Show comment
Hide comment
@succeun

succeun Jul 4, 2013

solved.. http://smartchamploo.blogspot.kr/2013/03/vizjs.html

As-is

function src(id) {
  return document.getElementById(id).innerHTML;
}

To-be

function src(id) {
  var dot = document.getElementById(id).innerHTML;
  return dot + new Array(dot.length).join(" ");
}

succeun commented Jul 4, 2013

solved.. http://smartchamploo.blogspot.kr/2013/03/vizjs.html

As-is

function src(id) {
  return document.getElementById(id).innerHTML;
}

To-be

function src(id) {
  var dot = document.getElementById(id).innerHTML;
  return dot + new Array(dot.length).join(" ");
}
@vmarkovtsev

This comment has been minimized.

Show comment
Hide comment
@vmarkovtsev

vmarkovtsev Apr 15, 2014

Works for me on the latest 0.0.3 without patching src function. If there are still problems with Unicode left, feel free to reopen this.

vmarkovtsev commented Apr 15, 2014

Works for me on the latest 0.0.3 without patching src function. If there are still problems with Unicode left, feel free to reopen this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment