diff --git a/weboob/applications/boobmsg/boobmsg.py b/weboob/applications/boobmsg/boobmsg.py index e7de4718..9fa99b68 100644 --- a/weboob/applications/boobmsg/boobmsg.py +++ b/weboob/applications/boobmsg/boobmsg.py @@ -183,7 +183,9 @@ class Boobmsg(ReplApplication): if text is None: if self.interactive: print 'Reading message content from stdin... Type ctrl-D from an empty line to post message.' - text = sys.stdin.read().decode(sys.stdin.encoding) + text = sys.stdin.read() + if sys.stdin.encoding: + text = text.decode(sys.stdin.encoding) if self.options.skip_empty and not text.strip(): return