utf-8 encodeing added for python 2 compatibility.