主要注意的就是,输入流需要提供编码参数UTF-8
URL restURL = new URL(url); HttpURLConnection conn = (HttpURLConnection) restURL.openConnection(); BufferedReader bReader = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
主要注意的就是,输入流需要提供编码参数UTF-8
URL restURL = new URL(url); HttpURLConnection conn = (HttpURLConnection) restURL.openConnection(); BufferedReader bReader = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
评一波