首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
推荐学习书目
›
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
V2EX
›
Python
Python 编码疑问?
invite
·
2015 年 1 月 19 日
· 2525 次点击
这是一个创建于 4032 天前的主题,其中的信息可能已经有所发展或是发生改变。
情况是这样的:
1. 用urllib2获取一个web页面, 页面是UTF-8的编码.
2. 用BeautifulSoup解析
结果报错: 'gbk' codec can't encode character....
这个 gbk 是什么时候出现的?
环境: Windows XP / Python 2.7
gbk
编码
Python
2 条回复
•
2015-01-19 20:50:07 +08:00
1
aeshfawre
2015 年 1 月 19 日
显示的窗口是gbk的, 你不显示到窗口上,就应该不抱错了
2
invite
OP
2015 年 1 月 19 日
@
aeshfawre
原来这样,多谢。
关于
·
帮助文档
·
自助推广系统
·
博客
·
API
·
FAQ
·
Solana
·
1900 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 23ms ·
UTC 00:25
·
PVG 08:25
·
LAX 16:25
·
JFK 19:25
♥ Do have faith in what you're doing.
❯