Skip to Content.
Sympa Menu

freetds - Re: [freetds] CTLib patch

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] CTLib patch
  • Date: Fri, 19 Jun 2009 11:01:07 +0200

2009/6/17 Andrew Victor <avictor.za AT gmail.com>
>
> hi Frediano,
>
> > ... it seems that client datatype does not support
> > wide characters, isn't it? So you are correctly trying to bind client
> > utf-8 (multi-byte) to server wide characters (nvarchar in mssql),
> > isn't it?
>
> There must be some data-type mapping to NVARCHAR?  I assumed it was
> CS_UNICHAR_TYPE.
>
>
> > Do you have an example so I can write a small unittests??
>
> I have extended the FreeTDS ctlib unit-test "rpc_ct_param.c", which is
> attached.
> Just ensure you have "client charset = UTF-8" in you freetds.conf
>
> Without the patch the unit-test gives:
>
> Open Client Message:
> Message number: LAYER = (0) ORIGIN = (0) SEVERITY = (9) NUMBER = (98)
> Message String: Error converting characters into server's character
> set. Some character(s) could not be converted
>
> Server message:
> Message number: 8016, Severity 16, State 26, Line 1
> Server 'xxxx'
> Message String: The incoming tabular data stream (TDS) remote
> procedure call (RPC) protocol stream is incorrect. Parameter 2
> ("@nvparam"): Data type 0xA7 has an invalid data length or metadata
> length.

Attached my patch which merge your test (currently not working)

freddy77

Attachment: ctlib_unichar.diff
Description: Binary data




Archive powered by MHonArc 2.6.24.

Top of Page