special case unicode handling that differs between python2 & 3