GuntherRademacher / rr

RR - Railroad Diagram Generator
Apache License 2.0
483 stars 49 forks source link

Add parameter for grammar input encoding #11

Closed bannmann closed 2 years ago

bannmann commented 2 years ago

My input file is in UTF-8, but it does not have a byte order mark. Consequently, RR uses my system's default charset (Windows-1252) and the text in my diagram ends up broken.

This PR enables users like me to explicitly set the input encoding, skipping the auto detection.

GuntherRademacher commented 2 years ago

Thank you for your work. I am fine with this. Please note however, that UTF-8 encoding can also be enforced by running java -Dfile.encoding=UTF-8 -jar rr.war ...

bannmann commented 2 years ago

Good point - I knew about that system property, but for some reason I didn't think of it then. So maybe the best reason for having an explicit argument is that it appears in the usage text. 😉

Thanks for merging the PR!