source: trunk/phpgwapi/inc/adodb/drivers/adodb-odbtp_unicode.inc.php @ 2

Revision 2, 1.7 KB checked in by niltonneto, 17 years ago (diff)

Removida todas as tags usadas pelo CVS ($Id, $Source).
Primeira versão no CVS externo.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1<?php
2/*
3V4.51 29 July 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://adodb.sourceforge.net
9*/
10
11// Code contributed by "Robert Twitty" <rtwitty#neutron.ushmm.org>
12
13// security - hide paths
14if (!defined('ADODB_DIR')) die();
15
16/*
17    Because the ODBTP server sends and reads UNICODE text data using UTF-8
18    encoding, the following HTML meta tag must be included within the HTML
19    head section of every HTML form and script page:
20
21    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
22
23    Also, all SQL query strings must be submitted as UTF-8 encoded text.
24*/
25
26if (!defined('_ADODB_ODBTP_LAYER')) {
27        include(ADODB_DIR."/drivers/adodb-odbtp.inc.php");
28}
29
30class ADODB_odbtp_unicode extends ADODB_odbtp {
31        var $databaseType = "odbtp_unicode";
32        var $_useUnicodeSQL = true;
33
34        function ADODB_odbtp_unicode()
35        {
36                $this->ADODB_odbtp();
37        }
38}
39
40class ADORecordSet_odbtp_unicode extends ADORecordSet_odbtp {
41        var $databaseType = 'odbtp_unicode';
42
43        function ADORecordSet_odbtp_unicode($queryID,$mode=false)
44        {
45                $this->ADORecordSet_odbtp($queryID, $mode);
46        }
47
48        function _initrs()
49        {
50                $this->_numOfFields = @odbtp_num_fields($this->_queryID);
51                if (!($this->_numOfRows = @odbtp_num_rows($this->_queryID)))
52                        $this->_numOfRows = -1;
53
54                if ($this->connection->odbc_driver == ODB_DRIVER_JET) {
55                        for ($f = 0; $f < $this->_numOfFields; $f++) {
56                                if (odbtp_field_bindtype($this->_queryID, $f) == ODB_CHAR)
57                                        odbtp_bind_field($this->_queryID, $f, ODB_WCHAR);
58                        }
59                }
60        }
61}
62?>
Note: See TracBrowser for help on using the repository browser.