#2225: Change common.decode_string to actually decode (return unicode)
-------------------+--------------------------------------------------------
 Reporter:  bro    |       Owner:            
     Type:  patch  |      Status:  new       
 Priority:  minor  |   Milestone:  1.4.0     
Component:  other  |     Version:  git master
 Keywords:         |  
-------------------+--------------------------------------------------------

Comment(by bro):

 In the
 
[https://github.com/bendikro/deluge/commit/d5e340354e46362126341020931df4606b421f20
 first commit] it was a list of tuples, but as gazpachoking commented
 
[https://github.com/bendikro/deluge/commit/60f196ff933795980e62d579da6713df7e76dc1f#commitcomment-2203128
 here] it's unnecessary to call chardet.detect when it's not needed.

 An alternative would be a method that returns the encoding based on the
 input e.g:

 {{{
 #!python
 def get_encoding(index):
     if index == 0:
         return ("utf8", 'strict')
     elif index == 1:
         return ("iso-8859-1", 'strict')
     ...
 }}}

-- 
Ticket URL: <http://dev.deluge-torrent.org/ticket/2225#comment:2>
Deluge <http://deluge-torrent.org/>
Deluge project

-- 
You received this message because you are subscribed to the Google Groups 
"Deluge Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-dev?hl=en.

Reply via email to