title: How to encode unicode string into utf-8 string in python
body: <p>I'm trying to convert a unicode string to utf-8 </p>
  
  <p>I have been reading about python unicode handling and in python.</p>
  
  <p>Python unicode how to says that I can do the following:</p>
  
  <pre><code>u.encode('utf-8')
  </code></pre>
  
  <p>where <code>u</code> is a unicode object.</p>
  
  <p>I'm calling encode('utf-8') to a unicode object but the result is:</p>
  
  <pre><code>RemoteScriptError: LookupError
  RemoteScriptError: no codec search functions registered: can't find encoding
  </code></pre>
  
  <p>Do I need any special import or call to make python know how to encode the unicode object in utf-8?</p>
  
  <p>Please note that i'm not using the system python. I'm inside a python 2.5 environment which seems to be builtin into the application I'm running this script.</p>
  
  <p>When I need something that the built in python doesn't have I need to import it, for example struct.py </p>
  
  <p>The application is Ableton Live which exposes the objects inside the application thru a python API. Ableton Live has tracks, clips, scenes, etc, which have a name property. That name property is a unicode object. I was using str(track.name) to get the string from the name, however it doesn't work with ç, á, í, characters...</p>
  
  <p>In summary... what do I need to include, import or call, in order to have <code>.encode(encoding)</code> working?</p>