Skip to content

Commit

Permalink
update: detect file charset
Browse files Browse the repository at this point in the history
  • Loading branch information
muedsa committed Jul 1, 2021
1 parent 8beb97d commit 26ea651
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/com/muedsa/intellij/textReader/TextFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public TextFile(String filePath) throws IOException {
inputStream = new BufferedInputStream(new FileInputStream(file));
CodepageDetectorProxy detector = CodepageDetectorProxy.getInstance();
detector.add(JChardetFacade.getInstance());
detector.add(ASCIIDetector.getInstance());
detector.add(UnicodeDetector.getInstance());
charset = detector.detectCodepage(file.toURI().toURL());
}

Expand Down

0 comments on commit 26ea651

Please sign in to comment.