cleanup str/unicode for python3