keep encoding strings for py2