V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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
holinhot
V2EX  ›  Python

\u767e\u5ea6\u4e00\u4e0b\uff0c\u4f60\u5c31\u77e5\u9053 这个是什么编码

  •  
  •   holinhot · Apr 27, 2015 · 7609 views
    This topic created in 4019 days ago, the information mentioned may be changed or developed.

    我爬的百度title怎么得到的这个

    16 replies    2015-04-28 00:49:57 +08:00
    bestsanmao
        1
    bestsanmao  
       Apr 27, 2015
    unicode
    ynyounuo
        2
    ynyounuo  
       Apr 27, 2015   ❤️ 2
    百度一下,你就知道
    Unicode Hex
    holinhot
        3
    holinhot  
    OP
       Apr 27, 2015
    我把他转换回来了

    @bestsanmao
    @ynyounuo
    chevalier
        4
    chevalier  
       Apr 27, 2015
    In [9]: print u'\u767e\u5ea6\u4e00\u4e0b\uff0c\u4f60\u5c31\u77e5\u9053'
    百度一下,你就知道

    In [10]:
    zkd8907
        5
    zkd8907  
       Apr 27, 2015
    clino
        6
    clino  
       Apr 27, 2015
    >>> print '\u767e\u5ea6\u4e00\u4e0b\uff0c\u4f60\u5c31\u77e5\u9053'.decode("unicode_escape")
    百度一下,你就知道
    Him
        7
    Him  
       Apr 27, 2015   ❤️ 1
    谜底就在谜面上
    zhangsan
        8
    zhangsan  
       Apr 27, 2015
    \用来转义
    u表示后面的字符表示的是unicode
    DavidHu
        9
    DavidHu  
       Apr 27, 2015
    百度一下,你就知道 2333333
    cruisehu
        10
    cruisehu  
       Apr 27, 2015
    randyzhao
        11
    randyzhao  
       Apr 27, 2015
    百度一下,你就知道
    答案就是解决办法 233
    clockwerk
        12
    clockwerk  
       Apr 27, 2015
    还真的是百度一下,你就知道
    holinhot
        13
    holinhot  
    OP
       Apr 27, 2015
    @nellace 必须是啊
    khan
        14
    khan  
       Apr 27, 2015
    unicode 的 utf16?
    233
        15
    233  
       Apr 28, 2015
    哈哈哈, 试了一下才看懂评论. 果然是百度一下,你就知道
    kzzhr
        16
    kzzhr  
       Apr 28, 2015 via Android
    广告贴
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   995 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 49ms · UTC 21:57 · PVG 05:57 · LAX 14:57 · JFK 17:57
    ♥ Do have faith in what you're doing.