msctexen
msctexen copied to clipboard
MSCGEN fails on accented characters (output file is ASCII instead of UTF8)
Hi, try this
msc { hscale = "2"; arcgradient = 8; a [label="Master"]; b [label="Slave"]; a->b: "Rampe accélération à 2000 tr/min/s"; b>>a: "Confirmation"; }
The accented characters from 'a->b' (accélération à) gets output into an ASCII file by '\immediate\openout' and makes MSCGEN crash.
Trying to integrate https://tex.stackexchange.com/questions/145343/encoding-of-written-out-files but failing to do so (not LaTeX specialist)
\VerbatimOut{@outname.tmp}}
See attached file 'msctexen_utf8.txt'
I think I nailed it thanks to https://tex.stackexchange.com/questions/149062/why-characters-utf-8-encoded-are-iso-8859-1-encoded-when-written-in-an-external
Dude, people are great...
Another option to consider https://tex.stackexchange.com/questions/460913/immediate-write-with-plain-text
\begin{filecontents*}[overwrite]{tmp.txt}