freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Using PHP mssql_init/bind for sending Unicode to Stored Procedures
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Using PHP mssql_init/bind for sending Unicode to Stored Procedures
- Date: Sat, 14 Jun 2008 13:43:16 -0400
ZIGLIO, Frediano, VF-IT wrote:
> > It's a little tricky because dbrpcparam() accepts VARCHAR and NVARCHAR
> > parameters. The libtds function that reads the parameter buffer must
> > distinguish between (VAR)CHAR, which should be converted, and
> > N(VAR)CHAR,
> > which is by definition UCS-2 (and doesn't need to be and can't be
> > converted).
> >
> > src/dblib/unittests/rpc.c needs to be enhanced to test this
> > feature, to
> > make sure we get it right. Patches welcome!
> >
>
> I think that dblib does not support wide characters... but we can extend
> it
db-lib makes some ASCII-ish assumptions. dbrpcsend() should respect the
client charset, though. If the datatype is SYBCHAR, dbrpcsend() should
convert from the client's charset to the server's charset. That's true
even if the client charset is UTF-8.
The conversion should happen in libtds, in a routine shared by ODBC and
db-lib, probably tds_submit_rpc(). That's as far as I got.
--jkl
-
[freetds] Using PHP mssql_init/bind for sending Unicode to Stored Procedures,
Jason Young (Morgon), 06/07/2008
- Re: [freetds] Using PHP mssql_init/bind for sending Unicode to StoredProcedures, Thomas, Christopher (LLU), 06/09/2008
-
Re: [freetds] Using PHP mssql_init/bind for sending Unicode to Stored Procedures,
James K. Lowden, 06/12/2008
-
Re: [freetds] Using PHP mssql_init/bind for sending Unicode to Stored Procedures,
ZIGLIO, Frediano, VF-IT, 06/12/2008
- Re: [freetds] Using PHP mssql_init/bind for sending Unicode to Stored Procedures, James K. Lowden, 06/14/2008
-
Re: [freetds] Using PHP mssql_init/bind for sending Unicode to Stored Procedures,
ZIGLIO, Frediano, VF-IT, 06/12/2008
Archive powered by MHonArc 2.6.24.