推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
run2
V2EX  ›  Python

一点python都不懂,求个python将目录以及子目录下文件 gbk转utf-8的py for sublime text2

  •  
  •   run2 · Feb 14, 2012 · 4026 views
    This topic created in 5347 days ago, the information mentioned may be changed or developed.
    一点python都不懂,求个python将目录以及子目录下文件 gbk转utf-8的py for sublime text2
    感谢

    要是有高人直接写成sublime的插件更好
    4 replies  •  1970-01-01 08:00:00 +08:00
    binux
        1
    binux  
       Feb 14, 2012
    转换编码和用什么语言有什么关系?
    如果非得python的话
    G+上某人写的

    all2utf: all2utf [pattern] [-R]
    Auto detect the encoding of text files and conver them into UTF-8.
    A few pattern examples are: *.txt, *.* etc.

    https://github.com/airyai/pwx-scripts/blob/master/all2utf
    run2
        2
    run2  
    OP
       Feb 14, 2012
    @binux 因为sublime text2的支持py的的插件
    kojp
        3
    kojp  
       Feb 14, 2012
    我也曾经 有过这个需求 ,但忘记写了还是没写了 ...,
    gavingeng
        4
    gavingeng  
       Feb 14, 2012
    iconv 或者enca就能做转码

    py只是替换过coding:gb2312 -->coding:utf-8
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   779 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 22:34 · PVG 06:34 · LAX 15:34 · JFK 18:34
    ♥ Do have faith in what you're doing.