The problem is caused by
\usepackage[utf8]{inputenc}
Then, the umlauts consists of active characters that unexpectedly get expanded, when the .dot
file is written:
digraph ao {rankdir=LR;
a [label="\unhbox \voidb@x \bgroup \let \unhbox \voidb@x \setbox \@tempboxa \hbox {A\global \mathchardef \accent@spacefactor \spacefactor }\accent 127 A\egroup \spacefactor \accent@spacefactor "]; o [label=<\unhbox \voidb@x \bgroup \let \unhbox \voidb@x \setbox \@tempboxa \hbox {O\global \mathchardef \accent@spacefactor \spacefactor }\accent 127 O\egroup \spacefactor \accent@spacefactor >]; a->o;}
The expansion can be prevented by e-TeX's \detokenize
:
\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage[pdf]{graphviz}
\begin{document}
\digraph{ao}{rankdir=LR;
a [label="\detokenize{Ä}"]; % graphviz allows double quoted labels
o [label=<\detokenize{Ö}>]; % and html labels
a->o;}
\end{document}
Then, the file ao.dot
preserves the umlauts:
digraph ao {rankdir=LR;
a [label="Ä"]; o [label=<Ö>]; a->o;}
The result:

brew install graphviz
). – Thruston Jan 20 '18 at 16:37