Open johan-sun opened 9 years ago
Yep, unicode is a recurring issue.
Plugin input used to be pre-encoded to utf-8, and there were still issues like this, where attempting to do string processing when mixing unicode and non-unicode strings would cause crashes. I think the best approach is just to use unicode strings everywhere, fixing crashes when they come up.
So yeah, manually fixing the encoding problems seems like the way to go. Feel free to do that yourself, or you can list the plugins that are crashing and I'll take a look at them.
Thanks for the report!
I have manually fixed the encoding problems in some plugins. #274
there are some case the unicode will convert into str automatically. str.join(unicode) str + unicode str % unicode
if the string contain some foreign language like chinese, it will crash (baidu ,youdao etc.) . so we need speciafy the charset like unicode('utf-8')
After encode some unicode to str with charset utf-8, everything is ok.
I suggest that pre-encode the argument to str with charset "utf-8" an then invoke the function results in plugin.py . Because most people forgot that the first argument of results can be a dict of unicode strings.
If need, I can manually fix the character encode problem of those bundles.