Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0b5

Bug #12948 ibase not support set charset for client
Submitted: 2008-01-21 16:30 UTC
From: afz Assigned: quipo
Status: Closed Package: MDB2_Driver_ibase (version CVS)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2008-01-21 16:30 UTC] afz (Ali Fazelzadeh)
Description: ------------ hi, I test this package over Interbase 7.x and also Firebird 1.5 and 2.x, this versions not support this query: "SET NAMES " via ibase_query function, and return query error. this patch return MDB2_ERROR_UNSUPPORTED instead of it. thanks

Comments

 [2008-01-21 16:31 UTC] afz (Ali Fazelzadeh)
Index: ibase.php =================================================================== RCS file: /repository/pear/MDB2/MDB2/Driver/ibase.php,v retrieving revision 1.210 diff -u -r1.210 ibase.php --- ibase.php 10 Nov 2007 13:27:03 -0000 1.210 +++ ibase.php 21 Jan 2008 15:15:22 -0000 @@ -561,21 +561,8 @@ */ function setCharset($charset, $connection = null) { - if (is_null($connection)) { - $connection = $this->getConnection(); - if (PEAR::isError($connection)) { - return $connection; - } - } - - $query = 'SET NAMES '.$this->quote($charset, 'text'); - $result = @ibase_query($connection, $query); - if (!$result) { - return $this->raiseError(null, null, null, - 'Unable to set client charset: '.$charset, __FUNCTION__); - } - - return MDB2_OK; + return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'Set charset', + 'PHP Interbase API does not support set client charset', __FUNCTION__); } // }}}
 [2008-01-22 15:57 UTC] quipo (Lorenzo Alberton)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. -- you're right, it is supported only when using ISQL... thanks for reporting the issue.