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