Skip to content

Commit

Permalink
Merge pull request #481 from qiniu/update_urlutil
Browse files Browse the repository at this point in the history
url util default charset utf8 [ci skip]
  • Loading branch information
sxci authored Jun 18, 2020
2 parents bcdda96 + 9e6e3ea commit 949ec33
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 949ec33

Please sign in to comment.