salut
mon problem c'est que j'arrive pa a afficher un ficher .txt écrit en arabe dans mon JTextArea , java il m'affiche toujour des ????????????????????,,
note : mon programme marche tré normal avec un text francai et j'utilise le JBuilder 2005
svp comment résoudre ce problem
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//************** voila mon code source
 
//*************** pour chaeger un corpus
 void ouvrir(){
          String path = new String("");
jFileChooser jFileChooser1 = new jFileChooser();
 
 
 
           if (JFileChooser.APPROVE_OPTION == jFileChooser1.showOpenDialog(this)) {
               path = jFileChooser1.getSelectedFile().getPath();
           }
           try {this.setTitle("IDENTIFICATEUR DE LA LANGUE-"+path);
               File file = new File(path);
               int size = (int) file.length();
               int chars_read = 0;
               FileReader in = new FileReader(file);
               char[] data = new char[size];
               while (in.ready()) {
                   chars_read += in.read(data, chars_read, size - chars_read);
               }
               in.close();
               corpus = new String(data, 0, chars_read);
               jTextArea5.append(corpus);
               } catch (IOException E) {
           }
 
     }