cargo-readme
cargo-readme copied to clipboard
Weird encoding issue on Windows
The — (EM DASH
) symbol in my doc comment got converted to gibberish from my current code page (cp1251). This might mean that the tool reads files in cp1251 but outputs them as UTF-8.
Another interesting issue is that we seem to be getting an UTF-16 BOM:
This is from a README.md
generated using cargo-readme
on Windows.
Note that this only happens when following the README and doing the following in PowerShell:
cargo readme > README.md
Might be an artifact of .NET using UTF-16 as an internal encoding and pipes being filtered through it.
Using the -o
parameter like this gives the expected UTF-8 result.
cargo readme -o README.md
Could be worth adding a note to the README.
Yeah, I opened a PR (#50) sometime before on this topic. I actually solved this the same way, by replacing >
with an -o
.