Edgewall Software

Changes between Initial Version and Version 1 of Ticket #10313, comment 3


Ignore:
Timestamp:
Aug 11, 2011, 2:00:44 PM (10 years ago)
Author:
Christian Boos

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10313, comment 3

    initial v1  
    66>>> from urllib import unquote
    77>>> filename = '%D0%94%D0%BE%D0%B3%D0%BE%D0%B2%D0%BE%D1%80%20%D0%BE%20%D0%BF%D1%80%D0%B5%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B8%20%D1%83%D1%81%D0%BB%D1%83%D0%B3%20%D1%82%D0%B5%D0%BB%D0%B5%D0%BA%D0%BE%D0%BC%D0%BC%D1%83%D0%BD%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D0%B9.doc'
    8 >>> len(filename), len(unquote(filename).decode('utf-8'))
     8>>> utf8_filename = unquote(filename)
     9>>> print utf8_filename
     10Договор о предоставлении услуг телекоммуникаций.doc
     11>>> unicode_filename = utf8_filename.decode('utf-8')
     12>>> len(filename), len(unicode_filename)
    913(274, 51)
    1014}}}