Question: I'm trying to read some French character from the file but some symbols comes if letter contains à é è.
Can anyone guide me how to get actual character of the file.
Here is my main method 

```
public static void main(String args[]) throws IOException

    {
    char current,org;

    //String strPath = "C:/Documents and Settings/tidh/Desktop/BB/hhItem01_2.txt";

    String strPath = "C:/Documents and Settings/tidh/Desktop/hhItem01_1.txt";
    InputStream fis;

    fis = new BufferedInputStream(new FileInputStream(strPath));

    while (fis.available() > 0) {
    current= (char) fis.read(); // to read character
                                                            // from file
                            int ascii = (int) current; // to get ascii for the
                                                        // character
                            org = (char) (ascii);
                            System.out.println(org);
    }

```

Answer: 
You're trying to read UTF-8 character actually using ASCII. Here's an example of how to implement your feature:

```
public class Test {
    private static final FILE_PATH = "c:\\temp\\test.txt";
    public static void main(String[] args){

    try {
        File fileDir = new File(FILE_PATH);

        BufferedReader in = new BufferedReader(
           new InputStreamReader(
                      new FileInputStream(fileDir), "UTF8"));

        String str;

        while ((str = in.readLine()) != null) {
            System.out.println(str);
        }

                in.close();
        } 
        catch (UnsupportedEncodingException e) 
        {
            System.out.println(e.getMessage());
        } 
        catch (IOException e) 
        {
            System.out.println(e.getMessage());
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}

```

Reference: [How to read UTF-8 encoded data from a file](https://www.mkyong.com/java/how-to-read-utf-8-encoded-data-from-a-file-java/)
The following assumes the text is in Windows Latin-1, but I have added alternatively UTF-8.

```
private static final String FILE_PATH = "c:\\temp\\test.txt";

Path path = Paths.get(FILE_PATH);
//Charset charset = StandardCharset.ISO_8859_1;
//Charset charset = StandardCharset.UTF_8;
Charset charset = Charset.forName("Windows-1252");
try (BufferedReader in = Files.newBufferedReader(path, charset)) {
    String line;
    while ((line = in.readLine()) != null) {
        System.out.println(line);
    }
}

```

The String `line` will contain the text in Unicode. It now depends whether System.out can represent that Unicode in your system encoding, using a conversion from Unicode.

```
System.out.println("My encoding is: " + System.getProperty("file.encoding"));

```

However if you picked the correct encoding, at most one `?` per special char. If you seem more per special char, use UTF-8 - a multi-byte encoding.

Pick a Unicode capable font too for the console.

A check for the having got `é` is:

```
String e = "\u00e9";
String s = new String(Files.readAllBytes(path), charset);
System.out.println("Contains e´ : " + s.contains(e));

```

---

***After comment:***

Better use Files.newBufferedReader *(which I corrected above)* as that can do the following.

```
try (BufferedReader in = new BufferedReader(
         new InputStreamReader(
             new FileInputStream(file), charset))) {

```

This buffers for faster reading, and the InputStreamReader uses a binary data InputStream plus an charset to convert it to (Unicode) of a Reader.