title: Cryptography cesar algorithm
body: <p>Hi i'm developing a cesar algorithm app it doesn't contain errors but i have a problem with special character i have squares instead of the appropriate character also i don't know how to deal with the spaces in my code </p>
  
  <pre><code> package cesar;
  
  import java.util.Scanner;
  
  public class Cesar {
  
  private static short codeMajuscule=65;
  private static short codeMinuscule=97;
  private static short tailleAlph = 26;
  
  public static void main(String[] args) {
  Scanner sc=new Scanner(System.in);
      System.out.println("Entrer la chaine a crypter");
      String phrase = sc.next();
        System.out.println("entrer votre cle");
     int c= sc.nextInt();
      System.out.println( "la phrase après transformation " + chiffrement(          phrase , c ) );     
  }
  
  private static String chiffrement( String ch , int n ){      
  
      String chDecripte="";
              ch=ch.replaceAll("[éèêë]", "e");
              ch=ch.replaceAll("[Ç]", "C");
              ch=ch.replaceAll("[ÈÉÊË]", "E");
              ch=ch.replaceAll("[ÌÍÎÏ]", "I");
              ch=ch.replaceAll("Ñ", "N");
              ch=ch.replaceAll("ÒÓÔŒ", "O");
              ch=ch.replaceAll("ÙÚÛÜ", "U");
              ch=ch.replaceAll("ÝŸ", "Y");
              ch=ch.replaceAll("àáâæ", "a");          
              ch=ch.replaceAll("[ÀÁÂÆ]", "A");
              ch=ch.replaceAll("[èéêë]", "e");                      
              ch=ch.replaceAll("[ìíîï]", "i");
              ch=ch.replaceAll("[ñ]", "n");
              ch=ch.replaceAll("[òóôœ]", "o");
              ch=ch.replaceAll("[ùúûü]", "u");
              ch=ch.replaceAll("[ýÿ]", "y");
  
      for( int i = 0 ; i &lt; ch.length() ; i++ ){
          if( ch.codePointAt(i) &gt;= codeMajuscule &amp;&amp; 
                  ch.codePointAt(i) &lt;= ( codeMajuscule + tailleAlph ) ){
  
              chDecripte += (char) ( ( ch.codePointAt( i ) - codeMajuscule + n ) %  tailleAlph +  codeMajuscule ) ;
  
          }else if( ch.codePointAt(i) &gt;= codeMinuscule &amp;&amp; 
                  ch.codePointAt(i) &lt;= ( codeMinuscule + tailleAlph ) ){
  
              chDecripte += (char) ( ( ch.codePointAt( i ) - codeMinuscule + n ) %  tailleAlph +  codeMinuscule ) ;    
          }else{
              chDecripte += ch.charAt( i );
          }
      }
      return chDecripte;  
  }   
  }
  </code></pre>
  
  <p>and thanks</p>