It's very easy to write code to convert encodings - although I'd expect there are tools to do it anyway. Simply:
- Create one
FileInputStreamto the existing file, and wrap it in anInputStreamReaderwith the appropriate encoding - Create one
FileOutputStreamto the new file, and wrap it in anOutputStreamWriterwith the appropriate encoding - Loop over the reader, reading characters into a buffer and writing out the contents of that buffer (just as many characters as you read) until you've read the whole file
- Close all resources (automatic with a try-with-resources block)
The first two steps are simpler with Files.newBufferedReader and Files.newBufferedWriter, too.