Open Trolldemorted opened 6 years ago
File is opened here:
And written to here:
I'm surprised this would happen. I don't see a reason for it?
The example and thus I are piping the content into a file, so cfg.dot_file
is None
, and stdout's encoding depends on the shell you use I presume?
Edit: Even if I write only a single letter this way, the BOM and encoding is that way, so I guess powershell uses utf16 (or something similar) and stdout adheres to that.
I really assumed write!() always outputted UTF-8. I don't know where this translation could be happening.
When starting cargo graph in windows' cmd shell, the output file is ASCII text. When you start it in windows' powershell, the output file is Little-endian UTF-16 Unicode text, with CRLF, CR line terminators and a byte order mark.
dot
fails to produce pngs from such a file: