title: Convert (C), (R), (TM) and (o) to ©, ®, ™, ° repectively in Java
body: <p>I want to convert (C), (R), (TM) and (o) to ©, ®, ™, ° repectively. </p>
  
  <p>I am replacing the string which contains the above mentioned characters with their respective symbols. Sample code snippet shown below</p>
  
  <pre><code>public static String convertSpecialCharacters( String source ){
  
       if( isNotEmpty( source ) ){
           source = source.replaceAll( "\\(o\\)", "°" ).replaceAll( "\\(C\\)", "©" ).replaceAll(  "\\(R\\)", "®" ).replaceAll( "\\(TM\\)", "™" );
       } 
  }
  </code></pre>
  
  <p>when i pass the string "Sample text © ® ° ™" i get the following output.</p>
  
  <p>"Sample Text ¬© ¬Æ ¬∞ ‚Ñ¢".</p>
  
  <p>The symbols get converted as expected when i run on local machine but When i deploy the application on tomcat server i get the above output.</p>
  
  <p>Is it something do with tomcat server? </p>
  
  <p>Any help appreciated.</p>