avoid double-decoding unicode when python behaves like python 3