Improved for python3 unicode strictness