title: pyodbc encoding question: big5 text is being mangled
body: <p>I am reading from a pyodbc connection with source data which is probably encoded in big5.</p>
  <p>for example:</p>
  <pre><code>cursor = myob_cnxn.cursor()
  cursor.execute(f&quot;select * from {tablename}&quot;)
  rows = cursor.fetchall()
  </code></pre>
  <p>in the rows list,
  an address column can look like this:</p>
  <pre><code>s=rows[8628][3]
  
  '¤EÀs»ò¦a¹D62¸¹¥Ã¦w¼s³õ2¼Ó8«Ç'
  </code></pre>
  <p>This is probably big5; the source is a Hong Kong MYOB file. If I use the export feature of this application and open in big5 encoding, I get chinese characters.
  MYOB stores data in a file, and I think it follows the encoding of the Windows machine (which is big5). I am running my code on such a Windows desktop, so my 32 bit python 3.7 environment is the same as the MYOB executable.</p>
  <p>If I save that 'string' via vi and open it in big5 encoding, I get chinese characters, but also some errors, errors which are not present in the application's export feature.</p>
  <p>python thinks it is a string.
  I have tried passing big5 encoding to pyodbc but it makes no difference.
  that is, <code>myob_cnxn.setencoding(encoding=&quot;big5&quot;) #this is not going to work, and it doesn't</code></p>
  <p>I am stuck with no good ideas. I think if I could get binary results not decoded strings, I may have a chance, but I don't actually know what I am getting with pyodbc and this connection</p>
  <hr />
  <p>The answer came from @lenz (so far, in a comment).</p>
  <p>This is my implementation, which uses errors = &quot;ignore&quot; and therefore throws away some characters. For me, this an acceptable outcome for this data.</p>
  <pre><code>   big5_decoded = value.encode(&quot;latin&quot;,errors=&quot;ignore&quot;).decode(&quot;big5&quot;,errors=&quot;ignore&quot;)
                  
                 
  </code></pre>