Opened 14 years ago

Closed 13 years ago

#1248 closed bug (Fixed)

deluge-console unicode support on redirected stdout

Reported by: naikoto Owned by: Cas
Priority: trivial Milestone: 1.3.2
Component: Console UI Version: 1.3.1
Keywords: unicode Cc:

Description

Continuation of ticket:1029. Unicode is not supported on redirected stdout.

$ deluge-console info

(valid list of torrents)

$ deluge-console info|awk '{print}'

(partial list)

Error getting torrent info: [Failure instance: Traceback: <type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode character u'\xe9' in position 50: ordinal not in range(128)
/usr/lib/python2.5/site-packages/twisted/internet/tcp.py:362:doRead
/usr/lib/pymodules/python2.5/deluge/ui/client.py:176:dataReceived
/usr/lib/python2.5/site-packages/twisted/internet/defer.py:243:callback
/usr/lib/python2.5/site-packages/twisted/internet/defer.py:312:_startRunCallbacks
--- <exception caught here> ---
/usr/lib/python2.5/site-packages/twisted/internet/defer.py:328:_runCallbacks
/usr/lib/pymodules/python2.5/deluge/ui/console/commands/info.py:119:on_torrents_status
/usr/lib/pymodules/python2.5/deluge/ui/console/commands/info.py:142:show_info
/usr/lib/pymodules/python2.5/deluge/ui/console/main.py:270:write
]

same with "|cat" and ">file"

Package: deluge-console

Version: 1.2.3-1 (debian)

Change History (5)

comment:1 Changed 13 years ago by Cas

  • Priority changed from major to trivial

comment:2 Changed 13 years ago by Cas

  • Resolution set to fixed
  • Status changed from new to closed

Tested with 1.3.1 and cannot reproduce so assumed fixed

comment:3 Changed 13 years ago by naikoto

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version changed from 1.2.3 to 1.3.1

I can reproduce:

$ deluge-console info|cat

Error getting torrent info: [Failure instance: Traceback: <type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode characters in position 31-36: ordinal not in range(128)
/usr/lib/python2.5/site-packages/twisted/internet/tcp.py:362:doRead
/usr/lib/pymodules/python2.5/deluge/ui/client.py:183:dataReceived
/usr/lib/python2.5/site-packages/twisted/internet/defer.py:243:callback
/usr/lib/python2.5/site-packages/twisted/internet/defer.py:312:_startRunCallbacks
--- <exception caught here> ---
/usr/lib/python2.5/site-packages/twisted/internet/defer.py:328:_runCallbacks
/usr/lib/pymodules/python2.5/deluge/ui/console/commands/info.py:119:on_torrents_status
/usr/lib/pymodules/python2.5/deluge/ui/console/commands/info.py:142:show_info
/usr/lib/pymodules/python2.5/deluge/ui/console/main.py:273:write
]
Package: deluge-console
Version: 1.3.1-1

The character is probably "東", it works without redirection.

comment:4 Changed 13 years ago by Cas

  • Milestone changed from Future to 1.3.2
  • Owner set to Cas
  • Status changed from reopened to assigned

comment:5 Changed 13 years ago by Cas

  • Resolution set to fixed
  • Status changed from assigned to closed

Thanks for update, I had only tested with unicode path and not unicode torrent name!

Now fixed in 1.3-stable: 3794773e95

Note: See TracTickets for help on using tickets.