title: Character Encoding, XML, Excel, python
body: <p>I am reading a list of strings that were imported into an excel xml file from another software program.  I am not sure what the encoding of the excel file is, but I am pretty sure its not windows-1252, because when I try to use that encoding, I wind up with a lot of errors. </p>
  
  <p>The specific word that is causing me trouble right now is: "Zmysłowska, Magdalena" (notice the "l" is not a standard "l", but rather, has a slash through it).</p>
  
  <p>I have tried a few things, Ill mention three of them here:</p>
  
  <p>(1)</p>
  
  <pre><code>page = unicode(page, "utf-8")
  page = unicodedata.normalize("NFKD", page)
  page = page.encode("utf-8", "ignore")
  
  Output: Zmys\xc5\x82owska, Magdalena
  Output after print statement: ZmysÅ‚owska, Magdalena
  </code></pre>
  
  <p>(2)</p>
  
  <pre><code>page = unicode(page, "utf-8")
  page = unicodedata.normalize("NFKD", page)
  
  Output: Zmys\u0142owska, Magdalena
  Output after print statment: Zmysłowska, Magdalena
  
  Note: this is great, but I need to encode it back to utf-8 before putting the string into my     db.  When I do that, by running page.encode("utf-8", "ignore"), I end up with ZmysÅ‚owska, Magdalena again.
  </code></pre>
  
  <p>(3)
      Do nothing (no normalization, no decode, no encode).  It seems like the string is already utf-8 when it comes in.  However, when I do nothing, the string ends up with the following output again:</p>
  
  <pre><code>Output: Zmys\xc5\x82owska, Magdalena
  Output after print statement: ZmysÅ‚owska, Magdalena
  </code></pre>
  
  <p>Is there a way for me to convert this string to utf-8?</p>