php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35162 odbc_result return ?
Submitted: 2005-11-09 05:41 UTC Modified: 2005-11-09 12:54 UTC
From: punalex at biosys dot net Assigned:
Status: Not a bug Package: ODBC related
PHP Version: 5.0.5 OS: win2003
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: punalex at biosys dot net
New email:
PHP Version: OS:

 

 [2005-11-09 05:41 UTC] punalex at biosys dot net
Description:
------------
I am from Hong Kong, and I have to use multibyte character

I use Access database and in the database I insert string in the database (Hex)A7DA9068 (This is 4 bytes, A7, DA, 90, 68 in Hex, I think you cannot see the character, so I type in hex)

I use odbc_result to get this string, however I cannot get the correct result!!

I use strlen to get the length of the result, it is also wrong!!

Reproduce code:
---------------
$Database = odbc_connect("Database", "", "");

$Recordset = odbc_exec($Database, "SELECT * FROM YCDatabase");

odbc_result($Recordset, "Address")

odbc_close($Database);

Expected result:
----------------
In the example of description, the expected result is
A7DA9068 (Hex)

Actual result:
--------------
A7DA3F (Hex, a ? instead of 9068)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-09 12:54 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 01:01:30 2024 UTC