Re: Data truncation by Microsoft ODBC driver for NVARCHAR
Jan Murre <[email protected]> Tue, 26 Sep 2017 15:46:32 +0200
| Newsgroups | gmane.comp.python.egenix.user |
|---|---|
| Message-ID | <CAE_3tvqnWGVCLHZgzcS9_YvTR9QM3OGoQhAZEEbncBP8v6WMPQ@mail.gmail.com> |
--===============34074105698463431== Content-Type: multipart/alternative; boundary="001a113de56a2ab9b1055a17e74c" --001a113de56a2ab9b1055a17e74c Content-Type: text/plain; charset="UTF-8" An issue in the php driver from microsoft that seems related: https://github.com/Microsoft/msphpsql/issues/231 On Tue, Sep 26, 2017 at 3:08 PM, Jan Murre <[email protected]> wrote: > Hi, > > I am query-ing a MS SQL database from Redhat Linux using the "Microsoft > ODBC Driver 13 for SQL Server". > > There is a NVARCHAR(30) field in our database that is filled with data > having a 2-byte utf-8 char on the last position. When query-ing, the ODBC > driver issues this warning: > > mx.ODBC.Error.Warning: ('01004', 0, '[Microsoft][ODBC Driver 13 for SQL > Server]String data, right truncation', 8668) > > This results in corrupted data in the resultsset, because only the first > byte of this 2-byte utf-8 char is in the column. > > I tried with serveral settings for 'connection.encoding' and > 'connections.stringformat', but without success. > > Is this an ODBC driver issue? Would it be possible to work around this > with certain settings of mxODBC? > > Regards, Jan > > > --001a113de56a2ab9b1055a17e74c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">An issue in the php driver from microsoft that seems relat= ed:<br><br><a href=3D"https://github.com/Microsoft/msphpsql/issues/231">htt= ps://github.com/Microsoft/msphpsql/issues/231</a><br><br></div><div class= =3D"gmail_extra"><br><div class=3D"gmail_quote">On Tue, Sep 26, 2017 at 3:0= 8 PM, Jan Murre <span dir=3D"ltr"><<a href=3D"mailto:[email protected]= l" target=3D"_blank">[email protected]</a>></span> wrote:<br><blockqu= ote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc s= olid;padding-left:1ex"><div dir=3D"ltr"><div><div><div>Hi,<br><br></div>I a= m query-ing a MS SQL database from Redhat Linux using the "Microsoft O= DBC Driver 13 for SQL Server".<br><br></div>There is a NVARCHAR(30) fi= eld in our database that is filled with data having a 2-byte utf-8 char on = the last position. When query-ing, the ODBC driver issues this warning:<br>= <br>mx.ODBC.Error.Warning: ('01004', 0, '[Microsoft][ODBC Drive= r 13 for SQL Server]String data, right truncation', 8668)<br><br></div>= <div>This results in corrupted data in the resultsset, because only the fir= st byte of this 2-byte utf-8 char is in the column.</div><div><br></div><di= v>I tried with serveral settings for 'connection.encoding' and '= ;connections.stringformat', but without success.</div><div><br></div><d= iv>Is this an ODBC driver issue? Would it be possible to work around this w= ith certain settings of mxODBC?</div><div><br></div><div>Regards, Jan</div>= <div><br></div><div><br></div></div> </blockquote></div><br></div> --001a113de56a2ab9b1055a17e74c-- --===============34074105698463431== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ https://www.egenix.com/mailman/listinfo/egenix-users --===============34074105698463431==--