api:utf-8 in java api

This commit is contained in:
lijing 2017-12-17 18:59:48 +08:00
parent bcc8ea0a12
commit fe47f3a29b
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ public class GstoreConnector {
//System.out.println("============================================"); //System.out.println("============================================");
// 定义 BufferedReader输入流来读取URL的响应 // 定义 BufferedReader输入流来读取URL的响应
in = new BufferedReader(new InputStreamReader(connection.getInputStream())); in = new BufferedReader(new InputStreamReader(connection.getInputStream(), "utf-8"));
String line; String line;
while ((line = in.readLine()) != null) { while ((line = in.readLine()) != null) {
//PERFORMANCE: this can be very costly if result is very large, because many temporary Strings are produced //PERFORMANCE: this can be very costly if result is very large, because many temporary Strings are produced