title: Tally ERP 9 XML XTTP Data export
body: <p>I was trying to Export Data from Tally ERP 9 via XML HTTP via localhost:9000. I am getting XML File with ASCII data. This causes many symbols with '?'. Like Ruppee symbol and Euro symbol. Is there any way to export data in Unicode?? The POC used was</p>
  
  <pre><code>import httplib
  c=httplib.HTTPConnection('localhost:9000')
  headers = {"Content-type": "text/xml;charset=UTF-8", "Accept": "text/xml"}
  params = """&lt;ENVELOPE&gt;
          &lt;HEADER&gt;
          &lt;TALLYREQUEST&gt;Export Data&lt;/TALLYREQUEST&gt;
          &lt;/HEADER&gt;
          &lt;BODY&gt;
          &lt;EXPORTDATA&gt;
          &lt;REQUESTDESC&gt;
          &lt;REPORTNAME&gt;List of Accounts&lt;/REPORTNAME&gt;
          &lt;STATICVARIABLES&gt;
          &lt;SVEXPORTFORMAT&gt;$$SysName:XML&lt;/SVEXPORTFORMAT&gt;
          &lt;ACCOUNTTYPE&gt;Ledgers&lt;/ACCOUNTTYPE&gt;
          &lt;ENCODINGTYPE&gt;UNICODE&lt;/ENCODINGTYPE&gt;
          &lt;/STATICVARIABLES&gt;
          &lt;/REQUESTDESC&gt;
          &lt;/EXPORTDATA&gt;
          &lt;/BODY&gt;
          &lt;/ENVELOPE&gt;
          """
  
  
  c.request("POST", "/", params, headers)
  r=c.getresponse().read()
  
  fl=file("d:/xtemp.xml","w")
  fl.write(r)
  fl.close()
  </code></pre>