title: Php web service - results are not showing right on Android
body: <p>I have a PHP web service that control all my Database functions that gives responses in JSON Object
  I'm encoding everything in the way to UTF-8 since I'm using Hebrew text - yet all my Hebrew text looses its spaces..</p>
  
  <p>this is my http response code in Android:</p>
  
  <pre><code>private JSONObject getApiResponse(HttpResponse response) throws Exception
  {
      //get response status line
      StatusLine statusLine = response.getStatusLine();
      //if statue line is ok - read the response and return it
      if (statusLine.getStatusCode() == HttpStatus.SC_OK) {
          HttpEntity entity = response.getEntity();
          ByteArrayOutputStream out = new ByteArrayOutputStream();
          entity.writeTo(out);
          out.close();                
          return new JSONObject(new String(out.toString().getBytes(),"UTF-8"));
      }
      return null;
  }
  </code></pre>
  
  <p>this is my echo of reponse if php:</p>
  
  <pre><code>    $api = new api();
      echo "&lt;meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"&gt;";
      echo utf8_encode($api -&gt; processRequest()); //processRequest() always returns JSON object
  </code></pre>
  
  <ul>
  <li>All data tables are in UTF 8</li>
  <li>PHP mysqli is set to UTF 8</li>
  </ul>
  
  <p>this is example of response from the service:</p>
  
  <pre><code>{"events":[
  {"Event_Code":"10212208",
   "Event_Name":"\u05de\u05e1\u05d9\u05d1\u05ea \u05e9\u05e9        
                 \u05e9\u05e0\u05d9\u05dd                             
                 \u05dc\u05d1\u05d0\u05e8\u05e7\u05d9",
    "Place":"\u05d4\u05e2\u05e6\u05de\u05d0\u05d5\u05ea 84 \u05d7\u05d9\u05e4\u05d4",
    "Start_Time":"2013-08-22 21:00:00",
    "End_Time":"2013-08-23  05:00:00",
    "Facebook_Id":"741688125",
     "User_Name":"Name"}]}
  </code></pre>
  
  <p>any idea ??</p>