Skip to content

Commit

Permalink
Use "UTF-8" encoding when importing
Browse files Browse the repository at this point in the history
  • Loading branch information
daimaqiao authored and shenhaibao committed Jul 27, 2017
1 parent 8d3441d commit 5c2732d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/deem/zkui/controller/Import.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)

} else {
uploadFileName = item.getName();
sbFile.append(item.getString());
sbFile.append(item.getString("UTF-8"));
}
}

Expand All @@ -112,7 +112,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
} else {
logger.debug("Upload file Processing " + uploadFileName);
dao.insertHistory((String) request.getSession().getAttribute("authName"), request.getRemoteAddr(), "Uploading File: " + uploadFileName + "<br/>" + "Overwrite: " + scmOverwrite);
inpStream = new ByteArrayInputStream(sbFile.toString().getBytes());
inpStream = new ByteArrayInputStream(sbFile.toString().getBytes("UTF-8"));
}

// open the stream and put it into BufferedReader
Expand Down

0 comments on commit 5c2732d

Please sign in to comment.