fix python2 unicode function