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

python 在解析 xml 时遇到的外文字符的问题

  •  
  •   ivanchou · May 5, 2015 · 4220 views
    This topic created in 4052 days ago, the information mentioned may be changed or developed.
    xml.etree.ElementTree.ParseError: undefined entity ö: line 47, column 18

    解析 xml 时遇到这个错误,搜索 ö 找到 http://www.thesauruslex.com/typo/eng/enghtml.htm 了这个,得知是外文的字符。

    xml 的 encoding="ISO-8859-1",而且在 sublime 中使用 ISO-8859-1 打开外文字符也并没有正确显示出来。

    google 了一圈没有发现解决办法,求解决方法。
    2 replies    2015-05-08 14:33:27 +08:00
    ivanchou
        2
    ivanchou  
    OP
       May 8, 2015
    @zzxworld 感谢 今天才发现这个问题的回答是有用的 虽然还没看明白是怎么实现的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4359 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 210ms · UTC 04:10 · PVG 12:10 · LAX 21:10 · JFK 00:10
    ♥ Do have faith in what you're doing.