use six to detect python version and return unicode data correspondingly