im trying to work on a folder full with downloaded xml (html) files. for now , the files are .txt files with hebrew in them , as i can see when i open the files.
when im trying to make a string out of the file to work on it , all of the hebrew becomes gibbrish. any ideas?
String fileSource = ("path/path");
File folder= new File(fileSource);
File[] listOfFiles = folder.listFiles();
for (File currentFile : listOfFiles) {
try {
content = FileUtils.readFileToString(currentFile , "UTF-8");
if i go and save the files as UTF-8 , it works. but i have so many files like that to work with.