title: pyodbc fast_executemany on Linux garbles strings on insert
body: <p>I have the following code, which works fine on Windows, and fails on Linux:</p>
  <pre><code>import pyodbc
  
  conn = pyodbc.connect(p_str = None, server = ..., app = ..., databsae = ...,
                        driver = '{ODBC Driver 17 for SQL Server}',
                        Trusted_Connection = 'yes')
  
  conn.setdecoding(pyodbc.SQL_CHAR, encoding = 'utf-8')
  conn.setdecoding(pyodbc.SQL_WCHAR, encoding = 'utf-8')
  conn.setencoding(encoding = 'utf-8')
  
  sql = 'INSERT INTO TestStrTbl(idKey,idValue) VALUES (?,?)'
  data = [('one', 'value1'), ('two', 'value2')]
  
  cursor = conn.cursor()
  cursor.connection.autocommit = False
  cursor.fast_executemany = True
  cursor.executemany(sql, data)
  cursor.commit()
  </code></pre>
  <p>I am inserting into and empty SQL Server table, created with the following SQL:</p>
  <pre><code>CREATE TABLE TestStrTbl
  (
      idKey   varchar(20) NOT NULL PRIMARY KEY,
      idValue varchar(20) NOT NULL
  )
  </code></pre>
  <p>The error returned is:</p>
  <blockquote>
  <p>Violation of PRIMARY KEY constraint 'PK__TestStrT__3FBEE7404FA9AB3B'.
  Cannot insert duplicate key in object 'dbo.TestStrTbl'. The duplicate
  key value is (?).</p>
  </blockquote>
  <p>When I use the same connection to read, or insert using complete strings, like</p>
  <pre><code>sql = &quot;INSERT INTO TestStrTbl(idKey,idValue) VALUES ('%s','%s')&quot;
  cursor.connection.autocommit = False
  cursor.fast_executemany = True
  for row in data:
      cursor.execute(sql % row)
  cursor.commit()
  </code></pre>
  <p>this works just fine. Another possibility is to let <code>cursor.fast_executemany = False</code>, then it will work on Linux as well. What could I do to fix this?</p>
  <p>I am running Python 3.7.8 with <code>pyodbc==4.0.24</code> on Ubuntu Linux.
  Thanks for your help.</p>
  <hr />
  <p><strong>UPDATE</strong></p>
  <p>Here are the unixODBC settings:</p>
  <pre><code>18:48:56 $&gt; odbcinst -j
  unixODBC 2.3.1
  DRIVERS............: /usr/local/etc/odbcinst.ini
  SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
  FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
  USER DATA SOURCES..: /home/myUserId/.odbc.ini
  SQLULEN Size.......: 8
  SQLLEN Size........: 8
  SQLSETPOSIROW Size.: 8
  </code></pre>