How to get correct encoding?
<p>I have utf-8 file which I want to read and display in my java program.</p>

<p>In eclipse console(stdout) or in swing I'm getting question marks instead of correct characters.</p>

<pre><code>BufferedReader fr = new BufferedReader(
                      new InputStreamReader(
                      new FileInputStream(f),"UTF-8"));
System.out.println(fr.readLine());

inpuStreamReader.getEncoding() //prints me UTF-8
</code></pre>

<p>I generally don't have problem displaying accented letters either on the linux console or firefox etc.</p>

<p>Why is that so? I'm ill from this :/</p>

<p>thank you for help</p>
