python下非常规utf8编码处理

最近在和微博页面打交道,发现微博返回的页面数据多数都是内嵌在javascript下的,而带来的后果就是其中的中文字符是json编码后的utf8编码。
而在python程序中获取页面后得到的结果大致有这样的字符:
"\u003Cp\u003E"
在python中这样可以直接打印出来:
print u"\u003Cp\u003E"
但作为一个变量,不能这样简单处理,需要进行编码转换:
str="\u003Cp\u003E"
print str.decode('unicode-escape')


已发布

分类

来自

标签:

评论

《 “python下非常规utf8编码处理” 》 有 13 条评论

  1. Buy enclomiphene usa cod

    buy enclomiphene overnight delivery

  2. kamagra ups expédition fedex.

    medicament kamagra ordonnance pilule

  3. online order androxal american express

    discount androxal cheap melbourne

  4. purchase dutasteride generic medications

    buy dutasteride online usa

  5. how to buy flexeril cyclobenzaprine generic pricing

    purchase flexeril cyclobenzaprine generic health

  6. gabapentin generico

    buy gabapentin without rx

  7. ordering fildena cheap discount

    cheapest buy fildena cheap usa

  8. buying itraconazole cheap prices

    order itraconazole buy online uk

  9. discount avodart cheap online pharmacy

    ordering avodart cost on prescription

  10. discount staxyn cheap in canada

    how to buy staxyn cheap uk buy purchase

  11. buy xifaxan american express canada

    buy cheap xifaxan australia where to buy

  12. buying rifaximin generic uk

    buy rifaximin low cost

  13. kamagra generická kanada

    kamagra c.o.d.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注