title: How to compile a java source file which is encoded as "UTF-8"?
body: <p>I saved my Java source file specifying it's encoding type as UTF-8 (using Notepad, by default Notepad's encoding type is ANSI) and then I tried to compile it using: </p>
  
  <pre><code>javac -encoding "UTF-8" One.java
  </code></pre>
  
  <p>but it gave an error message"</p>
  
  <pre><code>One.java:1: illegal character: \65279
  
  ?public class One {
  
  ^
  1 error
  </code></pre>
  
  <p>Is there any other way, I can compile this?</p>
  
  <p>Here is the source:</p>
  
  <pre><code>public class One {
      public static void main( String[] args ){
          System.out.println("HI");
      }
  } 
  </code></pre>