title: Error "UTF-8" in Sever and Client Android when decode - encode?
body: <p>I have an error when username in my app on android. I use TomCat server and Eclipse.</p>
  
  <p>My code in Client:</p>
  
  <pre><code>    String name = "Quân";
      Debug.e("1" + name);
      try {
          url = URLEncoder.encode(name, "UTF-8");
          Debug.e("2" + url);
      } catch (UnsupportedEncodingException e) {
          e.printStackTrace();
      }
      try {
          Debug.e("3" + URLDecoder.decode(url, "UTF-8"));
      } catch (UnsupportedEncodingException e) {
          e.printStackTrace();
      }
      client = new WebSocketClient(URI.create(WsConfig.URL_WEBSOCKET
              + url), new WebSocketClient.Listener() {
          @Override
          public void onConnect() {
  
          }
  
          /**
           * On receiving the message from web socket server
           * */
          @Override
          public void onMessage(String message) {
              Log.d(TAG, String.format("Got string message! %s", message));
  
              parseMessage(message);
  
          }
  
          @Override
          public void onMessage(byte[] data) {
              Log.d(TAG, String.format("Got binary message! %s",
                      bytesToHex(data)));
  
              // Message will be in JSON format
              parseMessage(bytesToHex(data));
          }
  
          /**
           * Called when the connection is terminated
           * */
          @Override
          public void onDisconnect(int code, String reason) {
  
              String message = String.format(Locale.US,
                      "Disconnected! Code: %d Reason: %s", code, reason);
  
              showToast(message);
  
              // clear the session id from shared preferences
              utils.storeSessionId(null);
          }
  
          @Override
          public void onError(Exception error) {
              Log.e(TAG, "Error! : " + error);
  
              showToast("Error! : " + error);
          }
  
      }, null);
  
      client.connect();
      return view;
  }
  </code></pre>
  
  <blockquote>
    <p>09-09 08:43:51.265 5838-5838/vtvlive.vn.barcaquan E/Tag MainFragment.java.onCreateView():92: 1Quân</p>
    
    <p>09-09 08:43:51.265 5838-5838/vtvlive.vn.barcaquan E/Tag MainFragment.java.onCreateView():95: 2Qu%C3%A2n</p>
    
    <p>09-09 08:43:51.266 5838-5838/vtvlive.vn.barcaquan E/Tag MainFragment.java.onCreateView():100: 3Quân</p>
  </blockquote>
  
  <p>For name "Quân", serverside threw to me this:</p>
  
  <pre><code>@OnOpen
  public void onOpen(Session session) {
  
      System.out.println(session.getId() + " has opened a connection");
  
      Map&lt;String, String&gt; queryParams = getQueryMap(session.getQueryString());
  
      String name = "";
  
      if (queryParams.containsKey("name")) {
  
          // Getting client name via query param
          name = queryParams.get("name");
          System.out.println("1"+name);
          try {
              name = URLDecoder.decode(name, "UTF-8");
              System.out.println("2"+name);
  
          } catch (UnsupportedEncodingException e) {
              e.printStackTrace();
          }
  
          // Mapping client name and session id
          nameSessionPair.put(session.getId(), name);
      }
  </code></pre>
  
  <blockquote>
    <blockquote>
      <p>0 has opened a connection</p>
      
      <p>1QuÃ¢n</p>
      
      <p>2QuÃ¢n</p>
    </blockquote>
  </blockquote>
  
  <p>Any suggestions how to solve it?</p>