推荐学习书目
› 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
david2016
V2EX  ›  Python

python2 版本代码包含中文的时候,字符集默认就是 utf-8 吧?

  •  
  •   david2016 · Apr 17, 2016 · 3337 views
    This topic created in 3819 days ago, the information mentioned may be changed or developed.
    5 replies  •  2016-04-18 08:37:24 +08:00
    menc
        1
    menc  
       Apr 18, 2016
    不,随着系统版本来。
    如果默认是 UTF8 , python2 也没有那么多遍吗问题了
    kamen
        2
    kamen  
       Apr 18, 2016 via Android
    python3 保平安
    billgreen1
        3
    billgreen1  
       Apr 18, 2016
    远离 windows 保平安。
    linux 和 Unix /Mac OS 都是可以设置默认 UTF-8 的。 Windows 是不同的语言有不同的代码页。我尝试过,好像不能改成 65001 ,关键 windows 的 UTF8 是有 BOM 的。
    dqh3000
        4
    dqh3000  
       Apr 18, 2016
    win 可能是 gtk
    ming2281
        5
    ming2281  
       Apr 18, 2016 via Android
    在 py2 上解决 unicode 问题
    是基本功之一
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2327 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 11:22 · PVG 19:22 · LAX 04:22 · JFK 07:22
    ♥ Do have faith in what you're doing.