Update base.py

Fixed ERROR: test_unicode.test_double_encoding from my last commit.