Join GitHub today
Wrote table title with unicode strings and got some string content is unreadable #88
Thanks for the very clear evidence of the problem as you experience it.
is unreliable on any Python. The Jython sys "module" is not properly reloaded because of differences in implementation from CPython. The default encoding is always 'ascii' in practice, so the effect of changing it will not have been tested. In fact, the only place I can see it used, the test is skipped.
This may be the source of your problem. openpyxl depends on xml.etree (in Jython) for its encoding as far as I can see. I think the author of eml.etree knows better than to make you call setdefaultencoding but I wasn't able to follow how that works in the time I've given it.
If i put sys.getdefaultencoding() after the following codes, i can get utf-8 charset encoding.
And this is very useful solution for unicode string in Python 2.x even though it exist some issues in exceptional cases.
I try the following code in my case(remove the above code), but it doesn't work also.