Skip to content

Commit 949ec33

Browse files
authored
Merge pull request #481 from qiniu/update_urlutil
url util default charset utf8 [ci skip]
2 parents bcdda96 + 9e6e3ea commit 949ec33

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/qiniu/util/UrlUtils.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ private static String urlEncode(String s, Charset charset, BitSet dontNeedEncodi
101101
throw new UnsupportedEncodingException(enc);
102102
}
103103
*/
104+
if (charset == null) {
105+
charset = Charset.forName("UTF-8");
106+
}
104107

105108
for (int i = 0; i < s.length(); ) {
106109
int c = (int) s.charAt(i);

0 commit comments

Comments
 (0)