wget 中文乱码
由于某种原因,需要用wget进行下文件,目录结构为:/cutimg/社交网络_rmvb/社交网络-0.jpg,下载到机器发现全是乱码
[root@video-picture01 ~]# !513
wget -r http://*/cutimg/Éç½»ÍøÂç_rmvb/Éç½»ÍøÂç-0.jpg
--2010-11-02 17:17:43-- http://*/cutimg/%E7%A4%BE%E4%BA%A4%E7%BD%91%E7%BB%9C_rmvb/%E7%A4%BE%E4%BA%A4%E7%BD%91%E7%BB%9C-0.jpg
Connecting to *:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1166 (1.1K) [image/jpeg]
Saving to: `*/cutimg/Éç½»ÁI91Ëç9C_rmvb/Éç½»ÁI91Ëç9C-0.jpg'
100%[==========================================================================================>] 1,166 --.-K/s in 0s
2010-11-02 17:17:43 (111 MB/s) - `*/cutimg/Éç½»ÁI91Ëç9C_rmvb/Éç½»ÁI91Ëç9C-0.jpg' saved [1166/1166]
解决办法:
[root@video-picture01 src]# wget
[root@video-picture01 src]# diff -u /home/wget-1.11.1/src/url.c url.c
--- /home/wget-1.11.1/src/url.c 2008-03-25 05:53:58.000000000 +0800
+++ url.c 2010-11-02 10:47:20.000000000 +0800
@@ -1333,7 +1333,7 @@
to quote. */
quoted = 0;
for (p = b; p < e; p++)
- if (FILE_CHAR_TEST (*p, mask))
+ if (FILE_CHAR_TEST (*p, mask) && !((*p | 0x0fffffff) == 0xffffffff))
++quoted;
/* Calculate the length of the output string. e-b is the input
重新编译wget
阅读(5235) | 评论(0) | 转发(0) |