2012-11-17 17 views
0

在默認瀏覽器我的理解編碼保留字符,用三個字節/字符
非字母數字字符:HTTP URL編碼機制

 `%HH', a percent sign and two hexadecimal  
     digits representing the ASCII code of the character. 

所以在服務器端可以說 的queryString是查詢解碼 前串和:

decodedQueryString = URLDecoder.decode(queryString , "Utf-8"); 

在該點的表達式的值:

decodedQueryString.length() < queryString.length(); 

通常應該是true,我說得對嗎?

回答

0

差不多。如果未解碼的查詢字符串不包含任何轉義字符,則長度將相等。我想不出任何在解碼後查詢字符串會更長的情況。