Problem with greek characters using java

Posted by Subhendu Mahanta on Stack Overflow See other posts from Stack Overflow or by Subhendu Mahanta
Published on 2010-06-01T02:30:59Z Indexed on 2010/06/01 2:33 UTC
Read the original article Hit count: 355

Filed under:
|
|

I am trying to write greek characters to a file using java like this:

String greek = "\u03c1\u03ae\u03bc. \u03c7\u03b1\u03b9\u03c1\u03b5\u03c4\u03ce";

 try {
         BufferedWriter out = new BufferedWriter(new FileWriter("E:\\properties\\outfilename.txt"));
         out.write(greek);
         out.close();
     } catch (IOException e) {
     }

Not working. Tried to use javac -encoding ISO-8859-7. Also tried java -Dfile.encoding=ISO-8859-7. Assuming that as I do not have greek font in my pc, I downloaded achillies (greek font - Ach4.ttf).Installed it by going to control panel> fonts. Any ideas?

© Stack Overflow or respective owner

Related posts about java

Related posts about encoding