gpt4 book ai didi

java - 为什么 apache-commons lib 编码空间为 + 而不是 %20?

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:07:32 26 4
gpt4 key购买 nike

我正在使用来自 Apache Commons CodecURLCodec对 URL 进行编码,但它将空格编码为 + 而不是 %20

为什么?什么是解决方案?

最佳答案

See this related question

当然,如果需要(编码后),您可以随时执行 url.replace("+", "%20");

关于java - 为什么 apache-commons lib 编码空间为 + 而不是 %20?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5071338/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com