File file = new File("file.txt");
BufferedWriter output=new BufferedWriter(new Filewriter(file));
output.write("data fetched from database");
I am fetching data from database which is mapped to corresponding DTO object and writing the same to the file using the getters of the DTO object.
It's working fine for the normal data, but fails for the data as below:
the word in DB is : KÄRNTEN.
When I open the file in Windows in notepad, it is proper.
When I open in vi or vim editor, after KÄ, it is going to a new line and writing the remaining.
when I open in wordpad or csv file in Windows, it's displayed as : KÄRNTEN.