Closed kukimik closed 3 years ago
I force-pushed a change that uses bracket_
to revert the encoding to the initial setting when we are done. This is a bit longer than the initial version in https://github.com/BurntSushi/erd/commit/1ff46710dcb7b80a50d5d214fd9ccc2888d7a789, but I believe it's better to clean up after ourselves, just in case one day this code gets used as a part of something larger.
@kukimik Brilliant! It nicely fixes the issue, thank you very much in the name of all!
I hope this will close #99.
localeEncoding
. (E.g. if someone uses latin2 encoding in the terminal and inputs the data manually, then we assume that data is encoded in latin2.)One alternative would be to assume that the input is always UTF-8 encoded, regardless of the locale.
Another idea would be to try UTF-8, and if it fails, then try the locale encoding. However, I'm not sure how to handle this properly.
@mmzx Please let me know what you think.
Before this gets merged we should perhaps include the information on the expected encoding somewhere in the README, maybe in the The
er
file format section. However, I wanted to know your opinion before trying to formulate this in a comprehensible way.