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

2015-04-27 14:59:45 +08:00
 holinhot

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

6991 次点击
所在节点    Python
16 条回复
bestsanmao
2015-04-27 15:01:02 +08:00
unicode
ynyounuo
2015-04-27 15:01:23 +08:00
百度一下,你就知道
Unicode Hex
holinhot
2015-04-27 15:02:16 +08:00
我把他转换回来了

@bestsanmao
@ynyounuo
chevalier
2015-04-27 15:03:13 +08:00
In [9]: print u'\u767e\u5ea6\u4e00\u4e0b\uff0c\u4f60\u5c31\u77e5\u9053'
百度一下,你就知道

In [10]:
zkd8907
2015-04-27 15:25:50 +08:00
clino
2015-04-27 15:26:29 +08:00
>>> print '\u767e\u5ea6\u4e00\u4e0b\uff0c\u4f60\u5c31\u77e5\u9053'.decode("unicode_escape")
百度一下,你就知道
Him
2015-04-27 16:01:31 +08:00
谜底就在谜面上
zhangsan
2015-04-27 16:14:58 +08:00
\用来转义
u表示后面的字符表示的是unicode
DavidHu
2015-04-27 16:17:59 +08:00
百度一下,你就知道 2333333
cruisehu
2015-04-27 16:28:37 +08:00
randyzhao
2015-04-27 16:31:22 +08:00
百度一下,你就知道
答案就是解决办法 233
nellace
2015-04-27 17:50:18 +08:00
还真的是百度一下,你就知道
holinhot
2015-04-27 17:57:44 +08:00
@nellace 必须是啊
khan
2015-04-27 18:12:20 +08:00
unicode 的 utf16?
233
2015-04-28 00:36:53 +08:00
哈哈哈, 试了一下才看懂评论. 果然是百度一下,你就知道
kzzhr
2015-04-28 00:49:57 +08:00
广告贴

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/186701

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX