title: Getting hebrew character from http response in json on android
body: <p>I'm working on a project in which I need to get some data from my app engine server which contains hebrew characters (the data is sent in json).</p>
  
  <p><strong>On server side:</strong> </p>
  
  <pre><code>resp.setHeader("Content-Type", "application/json; charset=UTF-8");
  PrintWriter out = resp.getWriter();
  out.print(responeData.toString());
  </code></pre>
  
  <p>when I'm debugging the server I see that the response data seems fine (meaning, it's showing my hebrew characters.</p>
  
  <p><strong>On the client side (android):</strong></p>
  
  <p>After executing this code, the resultData i'm getting is with ??? instead hebrew characters.
  I tried all different encodings such as 'windows-1255', 'iso-8859-8' 
  Does anyone knows what the problem is?
  Thanks!</p>
  
  <pre><code>// Create new default http client
      HttpClient client = new DefaultHttpClient();
      HttpConnectionParams.setConnectionTimeout(client.getParams(), 10000); // Timeout Limit
      HttpConnectionParams.setSoTimeout(client.getParams(), 10000);
      HttpResponse response;
      HttpPost post = new HttpPost(serviceURL);
  
      try {
          StringEntity se = new StringEntity(requestPayload.toString());
          post.addHeader(CustomHeader.TASK_NAME.getHeaderName(), taskName);
          se.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
          post.setEntity(se);
  
          // Execute the request
          response = client.execute(post);
  
          // Get the response status code
          StatusLine statusLine = response.getStatusLine();
          int statusCode = statusLine.getStatusCode();
  
          if (statusCode == 200) { // Ok
              if (response != null) { // Checking response
                  InputStream in = response.getEntity().getContent(); // Get the data in the entity
                  retreturnVal = HttpCaller.readContentFromIS(in);
              }
          }
      } catch (Exception e) {
          Log.e("Error in connectivity layer, stacktrace: ", e.toString());
          return null;
      }
  
      public static String readContentFromIS(InputStream in) throws IOException {
      BufferedReader reader = new BufferedReader(
              new InputStreamReader(in, "UTF-8"), 8);
      StringBuffer sb = new StringBuffer();
      String line = "";
      while ((line = reader.readLine()) != null) {
          sb.append(line + "\n");
      }
      return sb.toString();       
  }
  </code></pre>