AiK писал(а): всё в кодировке cp1251.
А какую установить кодировку в JTextArea? Какую бы не ставил выводит все равно квадратами .
Код :
File f = fileopen.getSelectedFile();
try (Reader reader = new InputStreamReader(new FileInputStream(f), "Cp1251"))
{
char[] buffer = new char[(int)f.length()];
reader.read(buffer);
tx.read( new FileReader( f.getAbsolutePath() ), null );
}
catch(IOException tx){
System.out.println(tx.getMessage());
}
}
});