title: Java outputstreamwriter writes a file with UTF-8 but linux server shows junk characters
body: <p>I am trying a fileWriter code with utf-8 encoding as my file contents contain French characters.
  File writer code:</p>
  <pre><code>Charset charset = Charset.forName(&quot;UTF-8&quot;);
  Writer writer = new OutputStreamWriter(new FileOutputStream(file), charset);
  beanWriter = factory.createWriter(input,writer);
  </code></pre>
  <p>When I try to open the target file in a windows machine, it shows the name properly. While in Linux, if I open the file that is written,  Example : CAMRôN from the original file is shown as CAMR�N</p>
  <p>Current encoding in windows is UTF-8 and in linux as well its UTF-8</p>
  <p>When I try to change it to other formats using iconv, it throws up an error</p>
  <pre><code> CAMRiconv: illegal input sequence at position 36
  </code></pre>
  <p>What should I do to avoid this junk character being displayed in linux. Is there anything missing in here? please help!</p>