Skip to content

Commit

Permalink
url util default charset utf8 [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
sxci committed Jun 18, 2020
1 parent bcdda96 commit 9e6e3ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/com/qiniu/util/UrlUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ private static String urlEncode(String s, Charset charset, BitSet dontNeedEncodi
throw new UnsupportedEncodingException(enc);
}
*/
if (charset == null) {
charset = Charset.forName("UTF-8");
}

for (int i = 0; i < s.length(); ) {
int c = (int) s.charAt(i);
Expand Down

0 comments on commit 9e6e3ea

Please sign in to comment.