title: Troubleshooting Unicode string behavior when updating Python 2.x->3.x
body: <p>I was using Python 2.7 in my project and since I have seen that Python 3.5 is already coming soon, I decided to upgrade my Python interpreter.</p>
  
  <p>I am using <code>base64</code> encoding. Since string objects are somehow different in new Python versions, I am getting the following error:</p>
  
  <p><code>TypeError: 'str' does not support the buffer interface</code></p>
  
  <p>I have already found out that I have to encode my string before passing it to this function (<code>'string'.encode()</code>), but isn't there a way to encode the string automatically to unicode or something? </p>