Partially: revert r8636, apply r8741,r8750.
Partially: revert r8636, apply r8741,r8750.

r8636 introduced a temporary fix for unicode problem #3081100. In r8741, a
more permanent solution was introduced. This solution was slightly changed in
r8750. The last solution is ported to rewrite in this commit.

pywikibot/core-migration-example