

In any case, it is better to handle the text from the variable it is stored than getting it from jEditorPane.getText().Next is Ukrainian alphabet and some other symbols from Russian and ancient languages. Will not return the Greek characters but something like Unfortunately, JEditorPane supports HTML 3.2 (to some arguable extend), while named Greek entities were added in HTML 4.0. Private static final Locale GREEK_LOCALE = new Locale("el", "GR") String s = new String(byteArray, "UTF-8") īyte a = string.getBytes("UTF-8") // Cp1253 Writer w = new OutputStreamWriter(new FileOutputStream(file), Charset.forName("UTF-8")) Writer w = new OutputStreamWriter(new FileOutputStream(file), "ISO-8859-7") // UTF-8 Reader r = new InputStreamWriter(new FileInputStream(file), Charset.forName("ISO-8859-7"))

Reader r = new InputStreamReader(new FileInputStream(file), "UTF-8") // ISO-8859-7 Whenever you open/save a text file, specify the character encoding and don't rely on the OS default encoding: Url="jdbc:mysql://localhost/timesheet?useUnicode=true characterEncoding=utf8" // or ISO-8859-7 If you can still not see Greek, edit my.conf and under tag add the string If you have already created the database, you can change its collation by clicking on Operations tab. If you are using phpmyadmin, you can do this while creating the database. Use one of the following collations: utf8_unicode_ci or utf8_general_ci.


In the Encoding property, select one of the following encodings: Right click on a project and select Properties. In the info property, under Text file encoding box, select one of the following encodings: Right click an eclipse project and select Properties.
