You probably want to have a list of supported encodings. For each file, try each encoding in turn, maybe starting with UTF-8. Every time you catch the MalformedInputException
, try the next encoding.
More Related Contents:
- French and Chinese characters are not appearing correctly
- How to Find the Default Charset/Encoding in Java?
- What is the default encoding of the JVM?
- Encoding conversion in java
- How to set request encoding in Tomcat?
- How to check if a String contains only ASCII?
- java.sql.SQLException: Incorrect string value: ‘\xF0\x9F\x91\xBD\xF0\x9F…’
- What is the most accurate encoding detector? [closed]
- Character Encoding Detection Algorithm
- JSON character encoding
- Guessing the encoding of text represented as byte[] in Java
- UTF-8 charset doesn’t work with javax.mail
- IntelliJ IDEA incorrect encoding in console output
- How to reliably guess the encoding between MacRoman, CP1252, Latin1, UTF-8, and ASCII
- Java Unicode encoding
- Converting byte array to String (Java)
- JDBC character encoding
- Display special characters using System.out.println
- Java: How to detect (and change?) encoding of System.console?
- UTF-8 encoding problem in Spring MVC
- In Java, how to find if first character in a string is upper case without regex
- Unable to change charset from ISO-8859-1 to UTF-8 in glassfish 3.1
- Read/write .txt file with special characters
- How can I open files containing accents in Java?
- Platform’s default charset on different platforms?
- Java PreparedStatement UTF-8 character problem
- Java: Converting String to and from ByteBuffer and associated problems
- First character of the reading from the text file :  [duplicate]
- Java compiler platform file encoding problem
- Detect the URI encoding automatically in Tomcat