Opened 15 years ago
Closed 15 years ago
#934 closed bug (Fixed)
encoding of torrent
Reported by: | bearsprite@gmail.com | Owned by: | andar |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Unknown | Version: | 1.1.7 |
Keywords: | Cc: |
Description
1. In deluge/ui/common.py, use some code to guess a encoding, and use the encoding to convert the mbcs string to utf8 string
self.__m_name = decode_string(self.__m_metadata["info"]["name"], self.encoding)
but why not:
self.__m_name = self.__m_metadata["info"]["name.utf-8"]
field "XXXX" is a mbcs, but field "XXXX.utf-8" is just a utf8!
-
for f in self.__m_metadata["info"]["files"]: self.__m_files.append({ 'path': decode_string(os.path.join(prefix, *f["path"])), 'size': f["length"], 'download': True })
here "prefix" is already a utf8, but f[ "path" ] is a mbcs yet, so os.path.join is invalid
Note:
See TracTickets
for help on using tickets.
In [5265].
Thanks!