Use codecs for py3.