【问题标题】:http url-encoding mechanismhttp url编码机制
【发布时间】:2012-11-05 18:35:22
【问题描述】:

在我的理解中,浏览器默认编码保留字符和
具有三个字节/字符的非字母数字字符:

        `%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 ,对吗?

【问题讨论】:

    标签: http servlets web urlencode


    【解决方案1】:

    几乎。如果未解码的查询字符串不包含任何转义字符,则长度将相等。我想不出解码后查询字符串会更长的任何情况。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-10-17
      • 1970-01-01
      • 2013-06-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多