`
daibalusu
  • 浏览: 344672 次
文章分类
社区版块
存档分类
最新评论

Android学习札记9:对URL链接中中文汉字的编码处理

 
阅读更多
String url = null;
try {
	url = new String("http://open.client.lashou.com/api/detail/city/" + URLEncoder.encode(city.getName(), "utf8") + "/p/1");
} catch(Exception e) {
	e.printStackTrace();
}
return url;

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics