理论不说了,主要说怎么解决。
该类问题 主要存在于 编码解码的问题。
由于 在传输过程中,将字符串中的 “+”,编码为 空格,而在解码时,并没有将 空格 解码为 +,故而应该在传输前,手动将 “+”进行编码
方法如下: string.replace("+","%2B");
如图所示
知乎: https://zhuanlan.zhihu.com/albertwang
微信公众号:AI-Research-Studio
下面是赞赏码
理论不说了,主要说怎么解决。
该类问题 主要存在于 编码解码的问题。
由于 在传输过程中,将字符串中的 “+”,编码为 空格,而在解码时,并没有将 空格 解码为 +,故而应该在传输前,手动将 “+”进行编码
方法如下: string.replace("+","%2B");
如图所示
知乎: https://zhuanlan.zhihu.com/albertwang
微信公众号:AI-Research-Studio
下面是赞赏码