<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>男单 618 &#187; zip</title>
	<atom:link href="http://www.ai7.org/wp/html/tag/zip/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ai7.org/wp</link>
	<description>生活象筒装的卫生纸，开始的时候怎么扯都不觉得在转，后来转的越来越快。</description>
	<lastBuildDate>Sun, 11 Dec 2011 12:22:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Ubuntu 9.10下unzip的乱码问题</title>
		<link>http://www.ai7.org/wp/html/678.html</link>
		<comments>http://www.ai7.org/wp/html/678.html#comments</comments>
		<pubDate>Fri, 01 Jan 2010 09:56:45 +0000</pubDate>
		<dc:creator>amao</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[zip]]></category>
		<category><![CDATA[乱码]]></category>

		<guid isPermaLink="false">http://www.ai7.org/wp/?p=678</guid>
		<description><![CDATA[Ubuntu 9.10中unzip升级为6.0，结果原来的-O参数没有了，解压缩Win平台来的带中文文件名的文件时，会有乱码。Google，Baidu无果后，自行使用Python解决。 01 #!/usr/bin/python 02 #coding=utf8 03 04 import zipfile 05 import sys 06 07 if len(sys.argv)&#60;2: 08     print u&#8217;punzip zipfilename&#8217; 09 else: 10     f=zipfile.ZipFile(sys.argv[1]) 11     nlist=f.namelist() 12     for n in nlist: 13         m=unicode(n,&#8217;gb2312&#8242;).encode(&#8216;utf8&#8242;) 14         file(m,&#8217;wb&#8217;).write(f.read(n)) 15     f.close() 只有基本功能，解压缩到当前目录下，不能新建目录…… 请自行修改。<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">相关文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ai7.org%2Fwp%2Fhtml%2F419.html&from=http%3A%2F%2Fwww.ai7.org%2Fwp%2Fhtml%2F678.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">解决ubuntu下truecrypt乱码问题</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ai7.org%2Fwp%2Fhtml%2F692.html&from=http%3A%2F%2Fwww.ai7.org%2Fwp%2Fhtml%2F678.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Mysql乱码问题（备忘）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ai7.org%2Fwp%2Fhtml%2F577.html&from=http%3A%2F%2Fwww.ai7.org%2Fwp%2Fhtml%2F678.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Ubuntu下批量重命名</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ai7.org%2Fwp%2Fhtml%2F799.html&from=http%3A%2F%2Fwww.ai7.org%2Fwp%2Fhtml%2F678.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Fcitx 4.0 郑码码表</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>Ubuntu 9.10中unzip升级为6.0，结果原来的-O参数没有了，解压缩Win平台来的带中文文件名的文件时，会有乱码。Google，Baidu无果后，自行使用Python解决。</p>
<p>01 #!/usr/bin/python<br />
02 #coding=utf8<br />
03<br />
04 import zipfile<br />
05 import sys<br />
06<br />
07 if len(sys.argv)&lt;2:<br />
08     print u&#8217;punzip zipfilename&#8217;<br />
09 else:<br />
10     f=zipfile.ZipFile(sys.argv[1])<br />
11     nlist=f.namelist()<br />
12     for n in nlist:<br />
13         m=unicode(n,&#8217;gb2312&#8242;).encode(&#8216;utf8&#8242;)<br />
14         file(m,&#8217;wb&#8217;).write(f.read(n))<br />
15     f.close()</p>
<div class="source" style="font-family: &amp;amp;amp;"><span class="_p">只有基本功能，解压缩到当前目录下，不能新建目录……</span></div>
<div class="source" style="font-family: &amp;amp;amp;"><span class="_p">请自行修改。<br />
</span></div>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">相关文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ai7.org%2Fwp%2Fhtml%2F419.html&from=http%3A%2F%2Fwww.ai7.org%2Fwp%2Fhtml%2F678.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">解决ubuntu下truecrypt乱码问题</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ai7.org%2Fwp%2Fhtml%2F692.html&from=http%3A%2F%2Fwww.ai7.org%2Fwp%2Fhtml%2F678.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Mysql乱码问题（备忘）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ai7.org%2Fwp%2Fhtml%2F577.html&from=http%3A%2F%2Fwww.ai7.org%2Fwp%2Fhtml%2F678.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Ubuntu下批量重命名</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ai7.org%2Fwp%2Fhtml%2F799.html&from=http%3A%2F%2Fwww.ai7.org%2Fwp%2Fhtml%2F678.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Fcitx 4.0 郑码码表</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.ai7.org/wp/html/678.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

