Skip to Content.
Sympa Menu

freetds - Re: [freetds] trouble with UTF-8 input data with mssql_bind

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] trouble with UTF-8 input data with mssql_bind
  • Date: Mon, 7 Dec 2009 21:34:33 -0500

Tomasz Kurkiewicz wrote:
>
> I'm using FreeTDS 0.82 to execute a stored procedure on a MS SQL Server
> 2005. Unfortunately, I keep getting error messages while executing a
> stored procedure using mssql_bind.
> Web server is Fedora 8, PHP 5.3.0, freetds 0.82, database server is
> called MSSQL.
...
> Client encoding is UTF-8, parameters are all nvarchars, it fails on a
> first nvarchar parameter (look at freetds.log).
>
> freetds.log says:
> "Error converting characters into server's character set. Some
> character(s) could not be converted"
> "The incoming tabular data stream (TDS) remote procedure call (RPC)
> protocol stream is incorrect. Parameter 2 ("@user_agent"): Data type
> 0xA7 has an invalid data length or metadata length."

I would be interested in a TDSDUMP log that includes the parameter binding
functions and the error returned by the server.

It's likely you've hit a long-standing problem. There's not much encoding
conversion built into the parameter binding functions in db-lib. The
expectation is that the bound buffer holds data encoded in the same form
as the column to which it applies. That could be changed, but someone has
to want to....

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page