How to post utf characters in android with getStreamFromURL? -


i send parameters server way in android code:

string url = "http://" + ip + formpath + "?" + constparameters                     + "&username=" + username + "&password=" + password                     + "&act=" + action;   inputstream jsonstream = jsonutil.getstreamfromurl(url, "get");  string jsonstring = jsonutil.streamtostring(jsonstream); 

but sends of parameters (which persian characters) ? character.

what can do? can't change way send parameters(this way can send them). thanks.

did try urlencoding username , password using urlencoder?

string encodedusername = urlencoder.encode(username, "utf-8"); string encodedpassword = urlencoder.encode(password, "utf-8"); string url = "http://" + ip + formpath + "?" + constparameters                     + "&username=" + encodedusername + "&password=" + encodedpassword                     + "&act=" + action; 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -