1

I use GrapViz graphs through R package DiagrammeR and RStudio. In my graphs international symbols like Ąą Čč Ęę Ėė Įį Šš Ųų Ūū Žž which are either in "Latin-4" ("ISO-8859-4") or in "Latin-6" ("ISO-8859-10") chart sets are not displayed correctly. I am aware of parameter charset [link], but it does not seem working with ("Latin-4" or "Latin-6").

Is there a way to use the listed symbols in GraphViz? I wonder if there is a possibility to indicate encoding in some other way?

digraph Latin6 {
    graph [label = "Latin 6"; 
         charset = "ISO-8859-10"]

     A  [label = "<A>  Ąą"]
     C  [label = "<C>  Čč"]
     E  [label = "<E>  Ęę"]
     E2 [label = "<E2> Ėė"]
     I  [label = "<I>  Įį"]
     S  [label = "<S>  Šš"]
     U  [label = "<U>  Ųų"]
     U2 [label = "<U2> Ūū"]
     Zz [label = "<Zz> Žž"]

     A -> C;
     C -> E;
     E -> E2;
     E2 -> I;
     S -> U;
     U -> U2;
     U2 -> Zz
}

enter image description here


I know that HTML symbols like #261; from UTF-8 Latin Extended A table may be used. If this conversion from international to HTML symbols is the only option, I would like to know if there is a function in R dedicated for direct (International symbol to HTML code) and backward (vice versa) conversion?

GegznaV
  • 4,938
  • 4
  • 23
  • 43
  • Not familiar with R, but try instead of `"Čč"`: `"\u010C\u10D"`. This corresponds with `Č` / `č` or `Č` / `č`. – Joop Eggen Jul 08 '16 at 08:25
  • Is there a way to **do this conversion automatically** (with a function, add-in, etc.) in R, RStudio, Notepad++ or other software? I raised a similar question in [this](http://stackoverflow.com/questions/38249987/how-to-translate-international-lithuanian-characters-to-the-correspondent-html) post. – GegznaV Jul 08 '16 at 08:31
  • If it works, R has the same Unicode-escaping (to plain ASCII) like java, C#, JavaScript and others. Then it is time to check the encoding of the R source. Look here: https://tomizonor.wordpress.com/2013/04/17/file-utf8-windows/ – Joop Eggen Jul 08 '16 at 08:41
  • I opened an [issue](https://github.com/rich-iannone/DiagrammeR/issues/187) on `Diagrammer`'s GitHub page. My problem is related to function `readLines`, which is internally used by `grViz` function. – GegznaV Aug 16 '16 at 18:19

0 Answers0