PHP 4.0 Bug #5444 Updated: Long VARCHARs create invalid strings
| From: | Bug Database | Date: | Fri, 07 Jul 2000 20:53:07 +0000 |
| Subject: | PHP 4.0 Bug #5444 Updated: Long VARCHARs create invalid strings | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-23748@lists.php.net to get a copy of this message | ||
ID: 5444
User Update by: schmidt@bcc.de
Status: Open
Bug Type: Oracle related
Description: Long VARCHARs create invalid strings
It appears not to depend on the length of the varchars, but it works on a BSD box where I still have
to find the configure params...
Maybe it's a NLS or UTF or something else character encoding specific. The data presented by
Oracle already contains the zeroes (text is "admin", retlen=10). A side effect of this is,
a 8 chars text in a varchar(10) can't be read and is truncated, a 18 chars text in a
varchar(20) is cut after the first char, and it doesn't throw a warning...
OCIDebug: _oci_make_zval: CUSTID,retlen = 11,retlen4 = 0,storage_size4 = 11,indicator 0, retcode = 0
for "longtest",
0a40 0a 43 55 53 54 49 44 20 2d 20 00 6c 00 6f 00 6e .CUSTID. -..l.o.n
0a50 00 67 00 74 00 3c 42 52 3e 4e 41 4d 45 20 2d 20 .g.t.<BR >NAME.-.
is returned.
OCIDebug: _oci_make_zval: NAME,retlen = 1,retlen4 = 0,storage_size4 = 21,indicator 0, retcode = 0
OCIDebug: _oci_make_zval: PASSWORD,retlen = 2,retlen4 = 0,storage_size4 = 21,indicator 0, retcode =
0
Full Bug description available at: http://bugs.php.net/?id=5444