3 V4.22 15 Apr 2004 (c) 2000-2004 John Lim (jlim@natsoft.com.my). All rights reserved.
4 Released under both BSD license and Lesser GPL library license.
5 Whenever there is any discrepancy between the two licenses,
6 the BSD license will take precedence. See License.txt.
7 Set tabs to 4 for best viewing.
8 Latest version is available at http://php.weblogs.com/
11 // Code contributed by "Robert Twitty" <rtwitty#neutron.ushmm.org>
14 Because the ODBTP server sends and reads UNICODE text data using UTF-8
15 encoding, the following HTML meta tag must be included within the HTML
16 head section of every HTML form and script page:
18 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
20 Also, all SQL query strings must be submitted as UTF-8 encoded text.
23 if (!defined('_ADODB_ODBTP_LAYER')) {
24 include(ADODB_DIR . "/drivers/adodb-odbtp.inc.php");
27 class ADODB_odbtp_unicode extends ADODB_odbtp
29 var $databaseType = "odbtp_unicode";
30 var $_useUnicodeSQL = true;
32 function ADODB_odbtp_unicode()
38 class ADORecordSet_odbtp_unicode extends ADORecordSet_odbtp
40 var $databaseType = 'odbtp_unicode';
42 function ADORecordSet_odbtp_unicode($queryID, $mode = false)
44 $this->ADORecordSet_odbtp($queryID, $mode);
49 $this->_numOfFields = @odbtp_num_fields($this->_queryID);
50 if (!($this->_numOfRows = @odbtp_num_rows($this->_queryID)))
51 $this->_numOfRows = -1;
53 if ($this->connection->odbc_driver == ODB_DRIVER_JET) {
54 for ($f = 0; $f < $this->_numOfFields; $f++) {
55 if (odbtp_field_bindtype($this->_queryID, $f) == ODB_CHAR)
56 odbtp_bind_field($this->_queryID, $f, ODB_WCHAR);