Openfst Drawing for Japanese (UTF-8)

The string “重み 付き 有限状態 トランスデューサ” is represented as automata in text format (jpn.wfst)

0 1 重み
1 2 付き
2 3 有限状態
3 4 トランスデューサ

A symbols file (jpn.syms) required is also required to compile the machine

0 1 重み
重み 1
付き 2
有限状態 3
トランスデューサ 4

The machine can be compiled and drawn with graphviz using the following commands:

fstcompile -acceptor=true -isymbols=jpn.syms jpn.wfsa | fstdraw -acceptor=true -isymbols=jpn.syms  -portrait=true | dot -Tpdf > jpn.pdf

If all the text files are in UTF-8 the pdf should display the Japnese strings correctly (as long as the viewer supports Japanese)