php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40150 PDO::ODBC Multiple byte letter is destroyed.
Submitted: 2007-01-16 23:28 UTC Modified: 2009-05-03 01:00 UTC
Votes:6
Avg. Score:4.8 ± 0.4
Reproduced:6 of 6 (100.0%)
Same Version:1 (16.7%)
Same OS:4 (66.7%)
From: chores at jp1 dot cx Assigned: wez (profile)
Status: No Feedback Package: PDO related
PHP Version: 5.2.1 OS: Windows Server 2003
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: chores at jp1 dot cx
New email:
PHP Version: OS:

 

 [2007-01-16 23:28 UTC] chores at jp1 dot cx
Description:
------------
Multiple byte letter is destroyed with SELECT.
As for database .mdb. By way of ODBC. 
Sentence end is destroyed.
The air which processes the place where it should process at the number of letters, at the number of bytes does.
(It translated this sentence with http://translate.google.com/translate_t.)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-17 08:22 UTC] tony2001@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2007-01-17 16:12 UTC] chores at jp1 dot cx
Source:
-------
<?php
mb_internal_encoding('Shift_JIS');
$fn_db = mb_convert_encoding('//xxx/xx/xxx/xxx.mdb', 'SJIS');
$dbh = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=$fn_db;Uid=Admin");
$sql = 'SELECT [t].c FROM [t]';
$cursor = $dbh->query($sql);
writeTableOneRowByPDOStatement($cursor);
while ($col_row = $cursor ->fetch(PDO::FETCH_ASSOC,NULL,1)) {
    foreach ($col_row as $col_name => $val) {
        echo "$col_name => $val<br>\n";
    }
}
?>
 [2007-01-17 16:17 UTC] tony2001@php.net
Please do not forget about expected and actual results.
 [2007-01-22 16:45 UTC] chores at jp1 dot cx
table(top), expected(center) and actual results(lower part):
-----------------------------------------------------------
http://test.jp1.cx/php_bugs/40150.png
 [2007-02-17 11:43 UTC] chores at jp1 dot cx
PHP 5.2.1 non-FIX
 [2009-04-25 14:42 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-05-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 16 14:01:32 2024 UTC