Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EAE22200C79 for ; Fri, 19 May 2017 14:25:40 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E950A160BD1; Fri, 19 May 2017 12:25:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 18E80160BBE for ; Fri, 19 May 2017 14:25:39 +0200 (CEST) Received: (qmail 67819 invoked by uid 500); 19 May 2017 12:25:39 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 67808 invoked by uid 99); 19 May 2017 12:25:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 May 2017 12:25:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id B964C1A0635 for ; Fri, 19 May 2017 12:25:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.98 X-Spam-Level: * X-Spam-Status: No, score=1.98 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gridgain-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id DTg9Z9y8NT7X for ; Fri, 19 May 2017 12:25:36 +0000 (UTC) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id EE8A95FB32 for ; Fri, 19 May 2017 12:25:35 +0000 (UTC) Received: by mail-lf0-f52.google.com with SMTP id 99so123990lfu.1 for ; Fri, 19 May 2017 05:25:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gridgain-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=UvQKEtLKTANkiPUGcEWNNzO2met3ckLNHC4WCJMQ/Es=; b=1km2iiozMzjla0m1fQii19fOtOonyH2QiGiDjO6/CE+rFrm0Tr2/A/FIUdPF2AaYcI 6fggBdsn0+gHIXf1cFZOtEYaVToNLP2QTLPHZp5+kr5K2iUwCzCHKSJas4Opr5K8G0kR Ywkg5euDnVAXsBTYulfifDUtVi8sjFlkdTdMWMfoA8GiQpdBja6DI/X6yuUIl2u0YABG ip/Y6v/5JkOFKSXjvJXv7Uss0+E4clVYIKPiBP9r3T/IBKggjoxmlkH3hGXGl35vLr5b Wb54jFsXeGdYcD00RwWxepB8vP/M2O7s1BZx1lEJSJIp69IWYtZMUgCeBJ+02XMJXwmW sAjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=UvQKEtLKTANkiPUGcEWNNzO2met3ckLNHC4WCJMQ/Es=; b=H7NrKN4XtbhwG2PVUlvT96ZwrC3HYKxn8Qt8V5kkodO7NFV3xZHCFEk/vK/V8d6gEG eSDVAHp1fDFottol3zgoTO2DSaX8Epc//FQvVHVfBsHGTQ2YlrFtHZ8SlZrmrjut9HOC M8QEVZnaIDKIJQyelAgdWAdmNaIH8gP95NFo5yYNkNI7TzGpgcr26iTchX2FGVdGMMo5 cMm3Q/aryA97UBGdHrs8YYsWxn9mwyAMD8eSY8eLFr1Scwz96SzXvJ9vrnSTYaS70Hn2 MXsGU672MXYM+V1v6sf8ncH5NTSowVB/N0mIFPSLVg6/9n+GncfguYCKGBag5ReT+bLF kuqw== X-Gm-Message-State: AODbwcBzxLfgqDmCG3LUqnXHJI/P043RkN2/X+LYH1r5+Y61W7Z9JCir 85VI+6riOzSZ9d9RakGlVWjW8k2Vnpa5 X-Received: by 10.25.170.77 with SMTP id t74mr2284182lfe.94.1495196728759; Fri, 19 May 2017 05:25:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.74.194 with HTTP; Fri, 19 May 2017 05:25:28 -0700 (PDT) In-Reply-To: <1495194340137-13024.post@n6.nabble.com> References: <1495194340137-13024.post@n6.nabble.com> From: Igor Sapego Date: Fri, 19 May 2017 15:25:28 +0300 Message-ID: Subject: Re: ODBC driver error during SELECT query for string data type To: user Content-Type: multipart/alternative; boundary="001a1141067ae3297c054fdf9dfe" archived-at: Fri, 19 May 2017 12:25:41 -0000 --001a1141067ae3297c054fdf9dfe Content-Type: text/plain; charset="UTF-8" Hi, Can you provide a bit more info about your code and library you have used to connect to ODBC? We have not tested our driver with python so it seems very interesting, but the only thing I can point you to right now is that our ODBC driver uses UTF-8, not UTF-16 encoding. I'm not sure if encoding is specified in application or library code though. Best Regards, Igor On Fri, May 19, 2017 at 2:45 PM, rishi007bansod wrote: > Hi, > While fetching string fields using ODBC driver from ignite cache in > python, I am getting following error, > > Traceback (most recent call last): > File "pythonOdbc.py", line 13, in > row = cursor.fetchone() > UnicodeDecodeError: 'utf16' codec can't decode byte 0x00 in position 2: > truncated data > > > ODBC connection string i have used is : > connection_string= > 'DRIVER=/usr/local/lib/libignite-odbc.so;ADDRESS= > localhost:10800;CACHE=Person' > > Is there any encoding parameter that I need to set to remove above error? > > Thanks > > > > -- > View this message in context: http://apache-ignite-users. > 70518.x6.nabble.com/ODBC-driver-error-during-SELECT- > query-for-string-data-type-tp13024.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. > --001a1141067ae3297c054fdf9dfe Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

Can you provide a bit more info abo= ut your code and library you have used
to connect to ODBC?
<= div>
We have not tested our driver with python so it seems ve= ry interesting, but
the only thing I can point you to right now i= s that our ODBC driver uses
UTF-8, not UTF-16 encoding. I'm n= ot sure if encoding is specified in
application or library code t= hough.


<= div dir=3D"ltr">
Best Regards,
Igor

On Fri, May 19, 2017 at 2:45 PM, rishi007ban= sod <rishi007bansod@gmail.com> wrote:
Hi,
=C2=A0 =C2=A0 While fetching string fields using ODBC driver from ignite ca= che in
python, I am getting following error,

Traceback (most recent call last):
=C2=A0 File "pythonOdbc.py", line 13, in <module>
=C2=A0 =C2=A0 row =3D cursor.fetchone()
UnicodeDecodeError: 'utf16' codec can't decode byte 0x00 in pos= ition 2:
truncated data


ODBC connection string i have used is :
connection_string=3D
'DRIVER=3D/usr/local/lib/libignite-odbc.so;ADDRESS=3Dlocalhos= t:10800;CACHE=3DPerson'

Is there any encoding parameter that I need to set to remove above error?
Thanks



--
View this message in context: http://apache-ignite-users.= 70518.x6.nabble.com/ODBC-driver-error-during-SELECT-query-fo= r-string-data-type-tp13024.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

--001a1141067ae3297c054fdf9dfe--