Skip to content
This repository has been archived by the owner on Sep 22, 2019. It is now read-only.

Input files all use UTF-8 encoding, need to read them that way #235

Open
jar398 opened this issue Apr 3, 2017 · 1 comment
Open

Input files all use UTF-8 encoding, need to read them that way #235

jar398 opened this issue Apr 3, 2017 · 1 comment

Comments

@jar398
Copy link
Member

jar398 commented Apr 3, 2017

In Java, if the encoding is left unspecified, it does not default to UTF-8. You have to use an InputStreamReader song and dance to ensure that files are read properly. This is the cause of OpenTreeOfLife/reference-taxonomy#317 . The problem has been fixed in taxomachine, but needs tending to in treemachine as well.

Places that need changing:

src/main/java/opentree/GraphImporter.java:            BufferedReader br = new BufferedReader(new FileReader(filename));
src/main/java/opentree/IngestSynthesisData.java:            BufferedReader br = new BufferedReader(new FileReader(newickFile));
src/main/java/opentree/IngestSynthesisData.java:            BufferedReader br = new BufferedReader(new FileReader(fileName));
src/main/java/opentree/IngestSynthesisData.java:            FileReader fileReader = new FileReader(fileName);
src/main/java/opentree/IngestSynthesisData.java:            BufferedReader br = new BufferedReader(new FileReader(fileName));
src/main/java/opentree/IngestSynthesisData.java:            BufferedReader br = new BufferedReader(new FileReader(fileName));
src/main/java/opentree/MainRunner.java:            FileReader fileReader = new FileReader(jsonFile);
src/main/java/opentree/MainRunner.java:            BufferedReader br = new BufferedReader(new FileReader(taxonomyfile));
src/main/java/opentree/MainRunner.java:            BufferedReader br = new BufferedReader(new FileReader(filename));
src/main/java/opentree/MainRunner.java:            BufferedReader br = new BufferedReader(new FileReader(newickFile));
@jar398
Copy link
Member Author

jar398 commented Apr 3, 2017

This also applies to ot-base.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant