Closed hanks closed 10 years ago
What is the code you are using to shell out to fab --list
and return it's output exactly? I suspect you aren't feeding utf-8 encoded data to Err itself.
@zoni Yes, I use output = subprocess.check_output(cmd, shell=True)
, and I found the output is a byte string not encoded in UTF-8...I use chardet
to detect it and result shows 30% possibility to be iso8859-2
, It is a little weird. I will handle this in my plugin level. Thank you for your advice.
Great, glad you got it sorted out!
When to execute
fab --list
to the bot to show help of each fab command, with some commands contained Japanese characters. It throws UnicodeDecodeError below:I use temp work around
return unicode(reply, errors='replace')
that can show help with some garbages. And I also check all the fab command files, they all contain#coding: utf8
at the begininng. Does here need something likedjango's smart_text library
that can handle any inputs?