search

Home  >  Q&A  >  body text

python character encoding conversion

py code:

Page html structure:

Return result:

[u'xe7x89x88xe3x80x80xe3x80x80xe6x9cxacxefxbcx9a']

What character encoding is this? How to convert it to the version number in html?

PHPzPHPz2827 days ago922

reply all(2)I'll reply

  • phpcn_u1582

    phpcn_u15822017-05-18 11:04:10

    This encoding is the way Chinese characters are stored in lists. You can try printing out the members of the list individually:

    print softcontent[0]

    reply
    0
  • 黄舟

    黄舟2017-05-18 11:04:10

    print softcontent[0]

    reply
    0
  • Cancelreply