1) http://php.weather.sina.com.cn/search.php?city=%B1%B1%BE%A9&dpc=1
2) http://php.weather.sina.com.cn/search.php?city=%C9%CF%BA%A3&dpc=1
上面的两个网址没有什么区别:%B1%B1%BE%A9 VS. %C9%CF%BA%A3,实际上是B1B1BEA9 & C9CFBAA3 (根据GB2312,B1B1代表“北”,BEA9,京,C9CF,上,BAA3,海)
我正在编写一个程序,以从输入字符获取GB2312代码,例如: input:"北京",output: B1B1BEA9。
有人能帮忙吗?非常感谢!
发布于 2014-01-07 11:06:45
String s="北京";
System.out.println(URLEncoder.encode(s,"GB2312"));这将产生以下结果:
%B1%B1%BE%A9你在找这个吗?
https://stackoverflow.com/questions/20969215
复制相似问题