Fix #1482 (error convert file from fb2 to lrf)

This commit is contained in:
Kovid Goyal 2008-12-29 12:58:02 -08:00
parent 662a4641bf
commit e8092dc368

View File

@ -199,7 +199,10 @@ class StatusBar(QStatusBar):
ret = QStatusBar.showMessage(self, msg, timeout)
if self.systray is not None:
if isosx and isinstance(msg, unicode):
msg = msg.encode(preferred_encoding)
try:
msg = msg.encode(preferred_encoding)
except UnicodeEncodeError:
msg = msg.encode('utf-8')
self.systray.showMessage('calibre', msg, self.systray.Information, 10000)
return ret