php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16244 nvarchar fields do not return properly with sybase_fetch_*()
Submitted: 2002-03-24 10:52 UTC Modified: 2002-11-21 17:05 UTC
Votes:7
Avg. Score:4.7 ± 0.7
Reproduced:7 of 7 (100.0%)
Same Version:4 (57.1%)
Same OS:3 (42.9%)
From: nick at loman dot net Assigned:
Status: No Feedback Package: Sybase (dblib) related
PHP Version: 4.1.2 OS: Redhat Linux 7.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nick at loman dot net
New email:
PHP Version: OS:

 

 [2002-03-24 10:52 UTC] nick at loman dot net
When accessing a Microsoft SQL Server 2000 database using the sybase access libraries and FreeTDS 0.53 running in TDS 7.0 mode, fields of type 'nvarchar' do not appear the same as they do in the database. Usually there are trailing characters from previous rows which have already been fetched, pointing to a null-terminator/string length issue.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-10 04:26 UTC] franck at sopac dot org
In fact php make a mistake on the length of the text buffer vs the number of characters.
In a unicode string there are 2 bytes per characters. PHP thinks that the number is the number of characters...
For instance the SQL network dump show the record as:
00d1 0400 "A"00 "R"00
and php takes 0400 as the number of characters instead of the number of bytes and then report:
"AR  " instead of "AR"
It is to be expected that this bug is on all unicode types...
I use MS-SQL7.0 freetds0.53 snapshot the sybase-php code (not sybase-ct) and on Mandrake 8.2.
 [2002-11-06 09:54 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-11-21 17:05 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2005-05-29 22:22 UTC] freddyz77 at tin dot it
FreeTDS do not support well nvarchar, use a recent version (0.53 is 4 year old)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 17:01:29 2024 UTC