新手问题 url 转码

hastings · July 10, 2013 · Last by fumesy replied at July 11, 2013 · 4262 hits

key=Dior 迪奥 +3348900998223 如何转换为 key=Dior%B5%CF%B0%C2%2B3348900998223

先转为 gbk 编码,然后再 escape.

CGI::escape(str.encode(Encoding::GBK))

URI::escape(url)

You need to Sign in before reply, if you don't have an account, please Sign up first.