Unicode-Patch for DBD::ODBC
am 15.03.2006 06:19:53 von Alexander
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/
RE: [dbi] Unicode-Patch for DBD::ODBC
am 15.03.2006 17:47:34 von Martin.Evans
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/
Re: [dbi] Unicode-Patch for DBD::ODBC
am 21.03.2006 08:55:51 von Alexander
Hello Martin,
just a quick reply, I'm in a hurry, so please let me verify this later.
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.
Or maybe I really missed the Shift key twice. ;-)
Alexander
Martin J. Evans wrote:
>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/
>>
>>
>
>
>
--
Alexander Foken
mailto:alexander@foken.de http://www.foken.de/alexander/