RE: [dbi] Unicode-Patch for DBD::ODBC

RE: [dbi] Unicode-Patch for DBD::ODBC

am 14.04.2006 12:20:12 von jurlwin

Please let me know what you come up with for a final patch and I will
try to incorporate this weekend...

> -----Original Message-----
> From: Alexander Foken [mailto:alexander@foken.de]
> Sent: Tuesday, March 21, 2006 2:56 AM
> To: Martin J. Evans
> Cc: dbi-users@perl.org
> Subject: Re: [dbi] Unicode-Patch for DBD::ODBC
>=20
> Hello Martin,
>=20
> just a quick reply, I'm in a hurry, so please let me verify this
later.
>=20
> Yes, this really looks wrong. But if I remember right, there was a
> reason for the "+". I think I (ab)used phs->sv to store Unicode in a
> char[], so I just made sure there was enough room for the trailing
> U+0000. If that's right, phs->maxlen counts bytes, not characters.
>=20
> Or maybe I really missed the Shift key twice. ;-)
>=20
> Alexander
>=20
> Martin J. Evans wrote:
>=20
> >Alexander,
> >
> >Thanks for this. I've not had a chance to try it but a quick scan
showed:
> >
> >- SvGROW(phs->sv, (phs->maxlen < 28) ? 28 : phs->maxlen+1);
> >+ SvGROW(phs->sv, (phs->maxlen+sizeof(WCHAR) < 28) ? 28 :
> >phs->maxlen+sizeof(WCHAR));
> >
> >Only because I was looking at this very line the other day it stood
out -
> >should that be "*sizeof(WCHAR)".
> >
> >Martin
> >--
> >Martin J. Evans
> >Easysoft Ltd, UK
> >http://www.easysoft.com
> >
> >On 15-Mar-2006 Alexander Foken wrote:
> >
> >
> >>Hello DBI-users,
> >>
> >>I've written a first patch for DBD::ODBC to support Unicode. The
patch
> >>was developed to make a custom project management software work with
> >>Unicode on Win32 with Microsoft's SQL Server via ODBC. It is in use
at
> >>several clients since about six months. So far, no bugs have been
> >>reported for the modified DBD::ODBC driver.
> >>
> >>The patch is available for download at from
> >>http://www.alexander-foken.de/unicode-patch.txt.gz. You find
detailed
> >>information in the README.unicode-patch file, HTML version available
at
> >>http://www.alexander-foken.de/README.unicode-patch.html.
> >>
> >>Please remember to read the README.unicode-patch file, especially
the
> >>"Known Problems" section. There are still some rough edges where
things
> >>work different than you may expect.
> >>
> >>Alexander
> >>
> >>--
> >>Alexander Foken
> >>mailto:alexander@foken.de http://www.foken.de/alexander/
> >>
> >>
> >
> >
> >
>=20
>=20
> --
> Alexander Foken
> mailto:alexander@foken.de http://www.foken.de/alexander/