title: DIAG [S1000] [SAP AG][LIBODBCHDB SO][HDBODBC] General error;-10427 Conversion of parameter/column (8) from data type NVARCHAR to ASCII failed
body: <p>I connect to BBDD HANA from PHP code. The connector is unixodbc. (table have spanish characters)</p>
  
  <p>When try to select records, if any field have special characters (ex: euro character) they skip fetch and log in odbc:</p>
  
  <p>DIAG [S1000] [SAP AG][LIBODBCHDB SO][HDBODBC] General error;-10427 Conversion of parameter/column (8) from data type NVARCHAR to ASCII failed</p>
  
  <p>The config odbc.ini</p>
  
  <pre><code>[hanadb]
  Driver = /usr/sap/hdbclient/libodbcHDB.so
  ServerNode = 172.17.xx.xx:31015
  </code></pre>
  
  <p>(i try to add this line, without any change)</p>
  
  <pre><code>DriverUnicodeType=1
  DriverManagerEncoding = UTF-8
  Locale = es_ES
  characterset=UTF8
  IANAAPPCODEPAGE=2026
  </code></pre>
  
  <p>The code in php</p>
  
  <pre><code>$result = odbc_exec($link,"SELECT * FROM ZIF_TCONDW ");
  
  while($datos=odbc_fetch_array($result)) {
      $query=sprintf("INSERT INTO condiciones values
     {...}
  </code></pre>
  
  <p>fields with text: </p>
  
  <blockquote>
    <p>Pedidos de 701€ a 1200€</p>
  </blockquote>
  
  <p>Crash, and in the trace file:</p>
  
  <p>DIAG [S1000] [SAP AG][LIBODBCHDB SO][HDBODBC] General error;-10427 Conversion of parameter/column (8) from data type NVARCHAR to ASCII failed</p>
  
  <p>I try too convert type in select sentence</p>
  
  <pre><code>$result = odbc_exec($link,"SELECT LIFNR,ZONA,POSCOND,LEFT(STRTOBIN(CONCEPTO,'UTF-8') ,400) AS CONCEPTO, CONDICION ,ORDEN,AEDAT,AEUHR,AENAM FROM ZIF_TCONDW "); 
  </code></pre>
  
  <p>or </p>
  
  <pre><code>$result = odbc_exec($link,"SELECT LIFNR,ZONA,POSCOND,base64_encode(CONCEPTO) AS CONCEPTO, base64_encode(CONDICION) AS CONDICION ,ORDEN,AEDAT,AEUHR,AENAM FROM ZIF_TCONDW ");
  </code></pre>
  
  <p>Without change.</p>