title: How do i send the Hindi text to php server by using HttpUrlConnection in Android
body: <p>I'm developing an Android application in which the user can register by choosing Hindi and English language. It is working fine while sending in English but while sending the hindi text I'm getting unknown format text <code>%E0%A4%A6%E0%A4%95%E0%A4%97</code> in the table.I have tried to put encoding for the header but it is not working.</p>
  
  <p>The code which I'm using </p>
  
  <pre><code>URL url = new URL(Config.ORGANISATION_DETAILS_URL);
  
  // Open a HTTP  connection to  the URL
  conn = (HttpURLConnection) url.openConnection(); 
  conn.setDoInput(true); // Allow Inputs
  conn.setDoOutput(true); // Allow Outputs
  conn.setUseCaches(false); // Don't use a Cached Copy
  conn.setRequestMethod("POST");
  conn.setRequestProperty("Connection", "Keep-Alive");
  conn.setRequestProperty("Accept-Charset", "UTF-8");
  conn.setRequestProperty("ENCTYPE", "multipart/form-data");
  conn.setRequestProperty("Content-Type", "multipart/form-data;charset=utf-8;boundary=" + boundary);
  
  // conn.setRequestProperty("Expect", "100-continue");
      conn.setRequestProperty("uploaded_file", fileName); 
  dos = new DataOutputStream(conn.getOutputStream());
  dos.writeBytes(twoHyphens + boundary + lineEnd);
  
  //Adding Parameter name of organisation
  String str=nameoforget.getText().toString();
  String nameoforg=URLEncoder.encode(str, "UTF-8");
  //String nameoforg=str;
  dos.writeBytes("Content-Disposition: form-data; name=\"nameoforg\"" + lineEnd); 
  //dos.writeBytes("Content-Type: text/plain; charset=UTF-8" + lineEnd);
  //dos.writeBytes("Content-Length: " + nameoforg.length() + lineEnd);
  dos.writeBytes(lineEnd);
  dos.writeBytes(nameoforg); // mobile_no is String variable
  dos.writeBytes(lineEnd);
  dos.writeBytes(twoHyphens + boundary + lineEnd);
  
  String noofstudents=""+noofstdset.getText().toString();
  dos.writeBytes("Content-Disposition: form-data; name=\"noofstudents\"" + lineEnd); 
  //dos.writeBytes("Content-Type: text/plain; charset=UTF-8" + lineEnd);
  //dos.writeBytes("Content-Length: " + noofstudents.length() + lineEnd);
  dos.writeBytes(lineEnd);
  dos.writeBytes(noofstudents); // mobile_no is String variable
  dos.writeBytes(lineEnd);
  dos.writeBytes(twoHyphens + boundary + lineEnd);
  
  /*To upload file*/ 
  dos.writeBytes("Content-Disposition: form-data; name=\"uploaded_file\";filename=\"" + fileName + "\"" + lineEnd);
  
  dos.writeBytes(lineEnd);
  if(sourceFileUri!=null)
  {
      // create a buffer of  maximum size
      bytesAvailable = fileInputStream.available(); 
  
      bufferSize = Math.min(bytesAvailable, maxBufferSize);
      buffer = new byte[bufferSize];
  
      // read file and write it into form...
      bytesRead = fileInputStream.read(buffer, 0, bufferSize);  
  
      while (bytesRead &gt; 0) {
          dos.write(buffer, 0, bufferSize);
          bytesAvailable = fileInputStream.available();
          bufferSize = Math.min(bytesAvailable, maxBufferSize);
          bytesRead = fileInputStream.read(buffer, 0, bufferSize);   
      }
  }
  // send multipart form data necesssary after file data...
  dos.writeBytes(lineEnd);
  dos.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd);
  </code></pre>
  
  <p>Thanks in Advance..</p>