Non ascii history caused problems for the %hist command with the -f option to save to file (#1375). This adds a test and fixes it.
Add test for writing non-ascii characters to file with %hist.
Fix tests for saving non-ascii history.
Fix for %hist saving non-ascii history to file.
So io.open has an encoding parameter, learned a new thing today :) Nice fix! Better/neater than the solution I had in mind too.
Yep, I discovered io.open recently - it's essentially the open() function from Python 3, available in Python 2.6 and above.
Seems like we want to be using io.open everywhere, is this true? Can you perhaps write up a simple policy note on that, either in dev docs, or your py3/unicode wiki page?
Yes, I expect it will be useful. I'll put it on the wiki page.