title: Why did't call web-service if text having spaces in between words.?
body: <p>My requirement is i want to save some data in database by using web-services. it's working fine up to without spaces between the words. </p>
  
  <p>my problem starts from here if entered text (getting text from EditText) having spaces i am getting this error.  </p>
  
  <pre><code>Illegal character in path at index 103: 
  </code></pre>
  
  <p>these are the strings from edittext : news as, news db.</p>
  
  <p>this is the code</p>
  
  <pre><code>try {   
     HttpClient httpClient = new DefaultHttpClient();
     HttpContext localContext = new BasicHttpContext();
  
    HttpPost postRequest = new HttpPost("mwweb" +channel_token+"/" +data_src_id+
                      "/"+ title+"/"+details);      
    HttpResponse response = httpClient.execute(postRequest, localContext);
    BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent(), "UTF-8"));
  
    String sResponse = reader.readLine();
    System.out.println(" response" +sResponse);
  
  
    } catch (Exception e) {            
      Log.e(e.getClass().getName(), e.getMessage());    
   }
  </code></pre>
  
  <p><strong>EDIT:</strong> i got half of the solution from <strong>Android, weakwire</strong> suggetions , if i use this replaceAll(" ", "%20") working if text have only spaces.  if i use encoding working if text have special charecters, did't get for spaces . i want the solution for both(means text having spaces and special charecters).   </p>