From: Jérémy Bobbio Date: Sat, 18 Jun 2011 16:30:12 +0000 (+0200) Subject: Merge commit 'upstream/0.1_rc1' X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4045ab92ea0c5b27fcd716f2c442e1848888546b;hp=a3590b7c49bc0803d02cf31f0590d2c48a65bbb0;p=roundcube.git Merge commit 'upstream/0.1_rc1' --- diff --git a/INSTALL b/INSTALL index ded4f2c..1778972 100644 --- a/INSTALL +++ b/INSTALL @@ -4,12 +4,20 @@ REQUIREMENTS * The Apache Webserver * .htaccess support allowing overrides for DirectoryIndex -* PHP Version 4.3.1 or greater -* PCRE (perl compatible regular expression) installed with PHP +* PHP Version 4.3.1 or greater including + - PCRE (perl compatible regular expression) + - Mcrypt (supporting Triple DES) + - libiconv + - Multibyte String (mbstring) + - Database driver for either MySQL, Postgres or SQLite * php.ini options: - error_reporting E_ALL & ~E_NOTICE (or lower) - file_uploads on (for attachment upload features) - memory_limit (increase as suitable to support large attachments) +* The PEAR framework with the following packages installed + - DB (1.7.11) + - Mail_Mime (1.3.1) + - Net_SMTP (1.2.10) * A MySQL or PostgreSQL database engine or the SQLite extension for PHP * A database with permission to create tables diff --git a/README b/README index f89b21d..40b5b97 100644 --- a/README +++ b/README @@ -24,9 +24,10 @@ Installation: ------------- For detailed instructions on how to install RoundCube webmail on your server, please refer to the INSTALL document in the same directory as this document. +Please carefully read the REQUIREMENTS section of the INSTALL instructions. -Licensing: +Licensing: ---------- This product is distributed under the GPL. Please read through the file LICENSE for more information about our license. @@ -43,24 +44,6 @@ already have a corresponding entry in the user's table (username and hostname) will be allowed. -Code Layout: ------------- -Basic sequence (index.php): - - index.php -> rcmail_load_gui -> new rcmail_template -> rcmail_template::send - - authentication details in this sequence - -Tasks - - index.php limits tasks to set list - - can see task in roundcube link when you mouse over it - - task templates stored in skins/default/templates - - templates "roundcube:" tokens that get replaced in rcmail_template class - -program/include/rcube_shared.inc - - defines rcube_html_page, class that lays out a roundcube web page - - defines form control classes - - provides common functions - - Contact: -------- For any bug reports or feature requests please refer to the tracking system diff --git a/bin/msgimport b/bin/msgimport new file mode 100755 index 0000000..f0ed3c0 --- /dev/null +++ b/bin/msgimport @@ -0,0 +1,120 @@ +#!/usr/bin/php -qC + 'host', 'u' => 'user', 'p' => 'pass', 'f' => 'file')) + array('host' => 'localhost'); + +if ($_SERVER['argv'][1] == 'help') +{ + print_usage(); + exit; +} +else if (!($args['host'] && $args['file'])) +{ + print "Missing required parameters.\n"; + print_usage(); + exit; +} +else if (!is_file($args['file'])) +{ + print "Cannot read message file\n"; + exit; +} + +// prompt for username if not set +if (empty($args['user'])) +{ + //fwrite(STDOUT, "Please enter your name\n"); + echo "IMAP user: "; + $args['user'] = trim(fgets(STDIN)); +} + +// prompt for password +echo "Password: "; +$args['pass'] = trim(fgets(STDIN)); + +// parse $host URL +$a_host = parse_url($args['host']); +if ($a_host['host']) +{ + $host = $a_host['host']; + $imap_ssl = (isset($a_host['scheme']) && in_array($a_host['scheme'], array('ssl','imaps','tls'))) ? TRUE : FALSE; + $imap_port = isset($a_host['port']) ? $a_host['port'] : ($imap_ssl ? 993 : 143); +} +else +{ + $host = $args['host']; + $imap_port = 143; +} + +// instantiate IMAP class +$IMAP = new rcube_imap(null); + +// try to connect to IMAP server +if ($IMAP->connect($host, $args['user'], $args['pass'], $imap_port, $imap_ssl)) +{ + print "IMAP login successful.\n"; + print "Uploading message...\n"; + + // upload message from file + if ($IMAP->save_message('INBOX', file_get_contents($args['file']))) + print "Message successfully added to INBOX.\n"; + else + print "Adding message failed!\n"; +} +else +{ + print "IMAP login failed.\n"; +} + +?> \ No newline at end of file diff --git a/index.php b/index.php index c23494b..fccfaac 100644 --- a/index.php +++ b/index.php @@ -2,7 +2,7 @@ /* +-----------------------------------------------------------------------+ | RoundCube Webmail IMAP Client | - | Version 0.1-rc1 | + | Version 0.1-rc1-dependent | | | | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland | | Licensed under the GNU GPL | @@ -36,7 +36,7 @@ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ - $Id: index.php 579 2007-05-18 13:11:22Z thomasb $ + $Id: index.php 618 2007-06-13 07:03:59Z thomasb $ */ diff --git a/program/include/main.inc b/program/include/main.inc index 8a5017b..f5c58a4 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -15,13 +15,11 @@ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ - $Id: main.inc 567 2007-05-17 18:41:24Z thomasb $ + $Id: main.inc 617 2007-06-13 06:57:22Z thomasb $ */ -require_once('lib/des.inc'); require_once('lib/utf7.inc'); -require_once('lib/utf8.class.php'); require_once('include/rcmail_template.inc'); @@ -789,7 +787,12 @@ function show_message($message, $type='notice', $vars=NULL) // encrypt IMAP password using DES encryption function encrypt_passwd($pass) { - $cypher = des(get_des_key(), $pass, 1, 0, NULL); + $td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, ""); + $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND); + mcrypt_generic_init($td, get_des_key(), $iv); + $cypher = mcrypt_generic($td, $pass); + mcrypt_generic_deinit($td); + mcrypt_module_close($td); return base64_encode($cypher); } @@ -797,7 +800,12 @@ function encrypt_passwd($pass) // decrypt IMAP password using DES encryption function decrypt_passwd($cypher) { - $pass = des(get_des_key(), base64_decode($cypher), 0, 0, NULL); + $td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, ""); + $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND); + mcrypt_generic_init($td, get_des_key(), $iv); + $pass = mdecrypt_generic($td, base64_decode($cypher)); + mcrypt_generic_deinit($td); + mcrypt_module_close($td); return preg_replace('/\x00/', '', $pass); } @@ -929,29 +937,17 @@ function rcube_charset_convert($str, $from, $to=NULL) if (function_exists('iconv') && $from!='UTF-7' && $to!='UTF-7') return iconv($from, $to, $str); - $conv = new utf8(); - // convert string to UTF-8 if ($from=='UTF-7') $str = utf7_to_utf8($str); else if (($from=='ISO-8859-1') && function_exists('utf8_encode')) $str = utf8_encode($str); - else if ($from!='UTF-8') - { - $conv->loadCharset($from); - $str = $conv->strToUtf8($str); - } // encode string for output if ($to=='UTF-7') return utf8_to_utf7($str); else if ($to=='ISO-8859-1' && function_exists('utf8_decode')) return utf8_decode($str); - else if ($to!='UTF-8') - { - $conv->loadCharset($to); - return $conv->utf8ToStr($str); - } // return UTF-8 string return $str; diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc index a777567..98bfd2d 100644 --- a/program/include/rcube_imap.inc +++ b/program/include/rcube_imap.inc @@ -16,7 +16,7 @@ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ - $Id: rcube_imap.inc 561 2007-05-17 15:18:12Z thomasb $ + $Id: rcube_imap.inc 587 2007-05-28 19:21:36Z thomasb $ */ @@ -2275,7 +2275,7 @@ class rcube_imap function _mod_mailbox($mbox_name, $mode='in') { - if (empty($mbox_name) || (!empty($this->root_ns) && $this->root_ns == $mbox_name) || $mbox_name == 'INBOX') + if ((!empty($this->root_ns) && $this->root_ns == $mbox_name) || $mbox_name == 'INBOX') return $mbox_name; if (!empty($this->root_dir) && $mode=='in') @@ -2312,12 +2312,14 @@ class rcube_imap function get_id($uid, $mbox_name=NULL) { - return $this->_uid2id($uid, $this->_mod_mailbox($mbox_name)); + $mailbox = $mbox_name ? $this->_mod_mailbox($mbox_name) : $this->mailbox; + return $this->_uid2id($uid, $mailbox); } function get_uid($id,$mbox_name=NULL) { - return $this->_id2uid($id, $this->_mod_mailbox($mbox_name)); + $mailbox = $mbox_name ? $this->_mod_mailbox($mbox_name) : $this->mailbox; + return $this->_id2uid($id, $mailbox); } function _uid2id($uid, $mbox_name=NULL) diff --git a/program/include/rcube_smtp.inc b/program/include/rcube_smtp.inc index 99b99e7..5d137cc 100644 --- a/program/include/rcube_smtp.inc +++ b/program/include/rcube_smtp.inc @@ -15,7 +15,7 @@ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ - $Id: rcube_smtp.inc 399 2006-12-06 21:37:37Z thomasb $ + $Id: rcube_smtp.inc 587 2007-05-28 19:21:36Z thomasb $ */ @@ -72,7 +72,7 @@ function smtp_mail($from, $recipients, &$headers, &$body, &$response) // create Net_SMTP object and connect to server if (!is_object($smtp_conn)) { - $helo_host = !empty($_SERVER['server_name']) ? $_SERVER['server_name'] : 'localhost'; + $helo_host = !empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost'; $SMTP_CONN = new Net_SMTP($smtp_host, $smtp_port, $helo_host); // set debugging diff --git a/program/js/app.js b/program/js/app.js index 5ae6710..57d473a 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -13,7 +13,7 @@ | Requires: common.js, list.js | +-----------------------------------------------------------------------+ - $Id: app.js 575 2007-05-18 12:35:28Z thomasb $ + $Id: app.js 615 2007-06-13 05:57:44Z thomasb $ */ @@ -1680,7 +1680,7 @@ function rcube_webmail() } // check for empty body - if ((input_message.value=='')&&(tinyMCE.getContent()=='')) + if (input_message.value=='') { if (!confirm(this.get_label('nobodywarning'))) { diff --git a/program/lib/Auth/SASL.php b/program/lib/Auth/SASL.php deleted file mode 100755 index 8cbd8d8..0000000 --- a/program/lib/Auth/SASL.php +++ /dev/null @@ -1,98 +0,0 @@ - | -// +-----------------------------------------------------------------------+ -// -// $Id: SASL.php 17 2005-10-03 20:25:31Z roundcube $ - -/** -* Client implementation of various SASL mechanisms -* -* @author Richard Heyes -* @access public -* @version 1.0 -* @package Auth_SASL -*/ - -require_once('PEAR.php'); - -class Auth_SASL -{ - /** - * Factory class. Returns an object of the request - * type. - * - * @param string $type One of: Anonymous - * Plain - * CramMD5 - * DigestMD5 - * Types are not case sensitive - */ - function &factory($type) - { - switch (strtolower($type)) { - case 'anonymous': - $filename = 'Auth/SASL/Anonymous.php'; - $classname = 'Auth_SASL_Anonymous'; - break; - - case 'login': - $filename = 'Auth/SASL/Login.php'; - $classname = 'Auth_SASL_Login'; - break; - - case 'plain': - $filename = 'Auth/SASL/Plain.php'; - $classname = 'Auth_SASL_Plain'; - break; - - case 'crammd5': - $filename = 'Auth/SASL/CramMD5.php'; - $classname = 'Auth_SASL_CramMD5'; - break; - - case 'digestmd5': - $filename = 'Auth/SASL/DigestMD5.php'; - $classname = 'Auth_SASL_DigestMD5'; - break; - - default: - return PEAR::raiseError('Invalid SASL mechanism type'); - break; - } - - require_once($filename); - return new $classname(); - } -} - -?> \ No newline at end of file diff --git a/program/lib/Auth/SASL/Anonymous.php b/program/lib/Auth/SASL/Anonymous.php deleted file mode 100755 index ac82dbb..0000000 --- a/program/lib/Auth/SASL/Anonymous.php +++ /dev/null @@ -1,71 +0,0 @@ - | -// +-----------------------------------------------------------------------+ -// -// $Id: Anonymous.php 17 2005-10-03 20:25:31Z roundcube $ - -/** -* Implmentation of ANONYMOUS SASL mechanism -* -* @author Richard Heyes -* @access public -* @version 1.0 -* @package Auth_SASL -*/ - -require_once('Auth/SASL/Common.php'); - -class Auth_SASL_Anonymous extends Auth_SASL_Common -{ - /** - * Not much to do here except return the token supplied. - * No encoding, hashing or encryption takes place for this - * mechanism, simply one of: - * o An email address - * o An opaque string not containing "@" that can be interpreted - * by the sysadmin - * o Nothing - * - * We could have some logic here for the second option, but this - * would by no means create something interpretable. - * - * @param string $token Optional email address or string to provide - * as trace information. - * @return string The unaltered input token - */ - function getResponse($token = '') - { - return $token; - } -} -?> \ No newline at end of file diff --git a/program/lib/Auth/SASL/Common.php b/program/lib/Auth/SASL/Common.php deleted file mode 100755 index 183a442..0000000 --- a/program/lib/Auth/SASL/Common.php +++ /dev/null @@ -1,74 +0,0 @@ - | -// +-----------------------------------------------------------------------+ -// -// $Id: Common.php 17 2005-10-03 20:25:31Z roundcube $ - -/** -* Common functionality to SASL mechanisms -* -* @author Richard Heyes -* @access public -* @version 1.0 -* @package Auth_SASL -*/ - -class Auth_SASL_Common -{ - /** - * Function which implements HMAC MD5 digest - * - * @param string $key The secret key - * @param string $data The data to protect - * @return string The HMAC MD5 digest - */ - function _HMAC_MD5($key, $data) - { - if (strlen($key) > 64) { - $key = pack('H32', md5($key)); - } - - if (strlen($key) < 64) { - $key = str_pad($key, 64, chr(0)); - } - - $k_ipad = substr($key, 0, 64) ^ str_repeat(chr(0x36), 64); - $k_opad = substr($key, 0, 64) ^ str_repeat(chr(0x5C), 64); - - $inner = pack('H32', md5($k_ipad . $data)); - $digest = md5($k_opad . $inner); - - return $digest; - } -} -?> diff --git a/program/lib/Auth/SASL/CramMD5.php b/program/lib/Auth/SASL/CramMD5.php deleted file mode 100755 index 678aa09..0000000 --- a/program/lib/Auth/SASL/CramMD5.php +++ /dev/null @@ -1,68 +0,0 @@ - | -// +-----------------------------------------------------------------------+ -// -// $Id: CramMD5.php 17 2005-10-03 20:25:31Z roundcube $ - -/** -* Implmentation of CRAM-MD5 SASL mechanism -* -* @author Richard Heyes -* @access public -* @version 1.0 -* @package Auth_SASL -*/ - -require_once('Auth/SASL/Common.php'); - -class Auth_SASL_CramMD5 extends Auth_SASL_Common -{ - /** - * Implements the CRAM-MD5 SASL mechanism - * This DOES NOT base64 encode the return value, - * you will need to do that yourself. - * - * @param string $user Username - * @param string $pass Password - * @param string $challenge The challenge supplied by the server. - * this should be already base64_decoded. - * - * @return string The string to pass back to the server, of the form - * " ". This is NOT base64_encoded. - */ - function getResponse($user, $pass, $challenge) - { - return $user . ' ' . $this->_HMAC_MD5($pass, $challenge); - } -} -?> \ No newline at end of file diff --git a/program/lib/Auth/SASL/DigestMD5.php b/program/lib/Auth/SASL/DigestMD5.php deleted file mode 100755 index 404851f..0000000 --- a/program/lib/Auth/SASL/DigestMD5.php +++ /dev/null @@ -1,194 +0,0 @@ - | -// +-----------------------------------------------------------------------+ -// -// $Id: DigestMD5.php 17 2005-10-03 20:25:31Z roundcube $ - -/** -* Implmentation of DIGEST-MD5 SASL mechanism -* -* @author Richard Heyes -* @access public -* @version 1.0 -* @package Auth_SASL -*/ - -require_once('Auth/SASL/Common.php'); - -class Auth_SASL_DigestMD5 extends Auth_SASL_Common -{ - /** - * Provides the (main) client response for DIGEST-MD5 - * requires a few extra parameters than the other - * mechanisms, which are unavoidable. - * - * @param string $authcid Authentication id (username) - * @param string $pass Password - * @param string $challenge The digest challenge sent by the server - * @param string $hostname The hostname of the machine you're connecting to - * @param string $service The servicename (eg. imap, pop, acap etc) - * @param string $authzid Authorization id (username to proxy as) - * @return string The digest response (NOT base64 encoded) - * @access public - */ - function getResponse($authcid, $pass, $challenge, $hostname, $service, $authzid = '') - { - $challenge = $this->_parseChallenge($challenge); - $authzid_string = ''; - if ($authzid != '') { - $authzid_string = ',authzid="' . $authzid . '"'; - } - - if (!empty($challenge)) { - $cnonce = $this->_getCnonce(); - $digest_uri = sprintf('%s/%s', $service, $hostname); - $response_value = $this->_getResponseValue($authcid, $pass, $challenge['realm'], $challenge['nonce'], $cnonce, $digest_uri, $authzid); - - return sprintf('username="%s",realm="%s"' . $authzid_string . ',nonce="%s",cnonce="%s",nc="00000001",qop=auth,digest-uri="%s",response=%s,%d', $authcid, $challenge['realm'], $challenge['nonce'], $cnonce, $digest_uri, $response_value, $challenge['maxbuf']); - } else { - return PEAR::raiseError('Invalid digest challenge'); - } - } - - /** - * Parses and verifies the digest challenge* - * - * @param string $challenge The digest challenge - * @return array The parsed challenge as an assoc - * array in the form "directive => value". - * @access private - */ - function _parseChallenge($challenge) - { - $tokens = array(); - while (preg_match('/^([a-z-]+)=("[^"]+(? diff --git a/program/lib/Auth/SASL/Login.php b/program/lib/Auth/SASL/Login.php deleted file mode 100755 index 58338a3..0000000 --- a/program/lib/Auth/SASL/Login.php +++ /dev/null @@ -1,65 +0,0 @@ - | -// +-----------------------------------------------------------------------+ -// -// $Id: Login.php 17 2005-10-03 20:25:31Z roundcube $ - -/** -* This is technically not a SASL mechanism, however -* it's used by Net_Sieve, Net_Cyrus and potentially -* other protocols , so here is a good place to abstract -* it. -* -* @author Richard Heyes -* @access public -* @version 1.0 -* @package Auth_SASL -*/ - -require_once('Auth/SASL/Common.php'); - -class Auth_SASL_Login extends Auth_SASL_Common -{ - /** - * Pseudo SASL LOGIN mechanism - * - * @param string $user Username - * @param string $pass Password - * @return string LOGIN string - */ - function getResponse($user, $pass) - { - return sprintf('LOGIN %s %s', $user, $pass); - } -} -?> \ No newline at end of file diff --git a/program/lib/Auth/SASL/Plain.php b/program/lib/Auth/SASL/Plain.php deleted file mode 100755 index 87f2c16..0000000 --- a/program/lib/Auth/SASL/Plain.php +++ /dev/null @@ -1,63 +0,0 @@ - | -// +-----------------------------------------------------------------------+ -// -// $Id: Plain.php 17 2005-10-03 20:25:31Z roundcube $ - -/** -* Implmentation of PLAIN SASL mechanism -* -* @author Richard Heyes -* @access public -* @version 1.0 -* @package Auth_SASL -*/ - -require_once('Auth/SASL/Common.php'); - -class Auth_SASL_Plain extends Auth_SASL_Common -{ - /** - * Returns PLAIN response - * - * @param string $authcid Authentication id (username) - * @param string $pass Password - * @param string $authzid Autorization id - * @return string PLAIN Response - */ - function getResponse($authcid, $pass, $authzid = '') - { - return $authzid . chr(0) . $authcid . chr(0) . $pass; - } -} -?> diff --git a/program/lib/DB.php b/program/lib/DB.php deleted file mode 100644 index f276454..0000000 --- a/program/lib/DB.php +++ /dev/null @@ -1,1388 +0,0 @@ - - * @author Tomas V.V.Cox - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: DB.php 12 2005-10-02 11:36:35Z sparc $ - * @link http://pear.php.net/package/DB - */ - -/** - * Obtain the PEAR class so it can be extended from - */ -require_once 'PEAR.php'; - - -// {{{ constants -// {{{ error codes - -/**#@+ - * One of PEAR DB's portable error codes. - * @see DB_common::errorCode(), DB::errorMessage() - * - * {@internal If you add an error code here, make sure you also add a textual - * version of it in DB::errorMessage().}} - */ - -/** - * The code returned by many methods upon success - */ -define('DB_OK', 1); - -/** - * Unkown error - */ -define('DB_ERROR', -1); - -/** - * Syntax error - */ -define('DB_ERROR_SYNTAX', -2); - -/** - * Tried to insert a duplicate value into a primary or unique index - */ -define('DB_ERROR_CONSTRAINT', -3); - -/** - * An identifier in the query refers to a non-existant object - */ -define('DB_ERROR_NOT_FOUND', -4); - -/** - * Tried to create a duplicate object - */ -define('DB_ERROR_ALREADY_EXISTS', -5); - -/** - * The current driver does not support the action you attempted - */ -define('DB_ERROR_UNSUPPORTED', -6); - -/** - * The number of parameters does not match the number of placeholders - */ -define('DB_ERROR_MISMATCH', -7); - -/** - * A literal submitted did not match the data type expected - */ -define('DB_ERROR_INVALID', -8); - -/** - * The current DBMS does not support the action you attempted - */ -define('DB_ERROR_NOT_CAPABLE', -9); - -/** - * A literal submitted was too long so the end of it was removed - */ -define('DB_ERROR_TRUNCATED', -10); - -/** - * A literal number submitted did not match the data type expected - */ -define('DB_ERROR_INVALID_NUMBER', -11); - -/** - * A literal date submitted did not match the data type expected - */ -define('DB_ERROR_INVALID_DATE', -12); - -/** - * Attempt to divide something by zero - */ -define('DB_ERROR_DIVZERO', -13); - -/** - * A database needs to be selected - */ -define('DB_ERROR_NODBSELECTED', -14); - -/** - * Could not create the object requested - */ -define('DB_ERROR_CANNOT_CREATE', -15); - -/** - * Could not drop the database requested because it does not exist - */ -define('DB_ERROR_CANNOT_DROP', -17); - -/** - * An identifier in the query refers to a non-existant table - */ -define('DB_ERROR_NOSUCHTABLE', -18); - -/** - * An identifier in the query refers to a non-existant column - */ -define('DB_ERROR_NOSUCHFIELD', -19); - -/** - * The data submitted to the method was inappropriate - */ -define('DB_ERROR_NEED_MORE_DATA', -20); - -/** - * The attempt to lock the table failed - */ -define('DB_ERROR_NOT_LOCKED', -21); - -/** - * The number of columns doesn't match the number of values - */ -define('DB_ERROR_VALUE_COUNT_ON_ROW', -22); - -/** - * The DSN submitted has problems - */ -define('DB_ERROR_INVALID_DSN', -23); - -/** - * Could not connect to the database - */ -define('DB_ERROR_CONNECT_FAILED', -24); - -/** - * The PHP extension needed for this DBMS could not be found - */ -define('DB_ERROR_EXTENSION_NOT_FOUND',-25); - -/** - * The present user has inadequate permissions to perform the task requestd - */ -define('DB_ERROR_ACCESS_VIOLATION', -26); - -/** - * The database requested does not exist - */ -define('DB_ERROR_NOSUCHDB', -27); - -/** - * Tried to insert a null value into a column that doesn't allow nulls - */ -define('DB_ERROR_CONSTRAINT_NOT_NULL',-29); -/**#@-*/ - - -// }}} -// {{{ prepared statement-related - - -/**#@+ - * Identifiers for the placeholders used in prepared statements. - * @see DB_common::prepare() - */ - -/** - * Indicates a scalar (?) placeholder was used - * - * Quote and escape the value as necessary. - */ -define('DB_PARAM_SCALAR', 1); - -/** - * Indicates an opaque (&) placeholder was used - * - * The value presented is a file name. Extract the contents of that file - * and place them in this column. - */ -define('DB_PARAM_OPAQUE', 2); - -/** - * Indicates a misc (!) placeholder was used - * - * The value should not be quoted or escaped. - */ -define('DB_PARAM_MISC', 3); -/**#@-*/ - - -// }}} -// {{{ binary data-related - - -/**#@+ - * The different ways of returning binary data from queries. - */ - -/** - * Sends the fetched data straight through to output - */ -define('DB_BINMODE_PASSTHRU', 1); - -/** - * Lets you return data as usual - */ -define('DB_BINMODE_RETURN', 2); - -/** - * Converts the data to hex format before returning it - * - * For example the string "123" would become "313233". - */ -define('DB_BINMODE_CONVERT', 3); -/**#@-*/ - - -// }}} -// {{{ fetch modes - - -/**#@+ - * Fetch Modes. - * @see DB_common::setFetchMode() - */ - -/** - * Indicates the current default fetch mode should be used - * @see DB_common::$fetchmode - */ -define('DB_FETCHMODE_DEFAULT', 0); - -/** - * Column data indexed by numbers, ordered from 0 and up - */ -define('DB_FETCHMODE_ORDERED', 1); - -/** - * Column data indexed by column names - */ -define('DB_FETCHMODE_ASSOC', 2); - -/** - * Column data as object properties - */ -define('DB_FETCHMODE_OBJECT', 3); - -/** - * For multi-dimensional results, make the column name the first level - * of the array and put the row number in the second level of the array - * - * This is flipped from the normal behavior, which puts the row numbers - * in the first level of the array and the column names in the second level. - */ -define('DB_FETCHMODE_FLIPPED', 4); -/**#@-*/ - -/**#@+ - * Old fetch modes. Left here for compatibility. - */ -define('DB_GETMODE_ORDERED', DB_FETCHMODE_ORDERED); -define('DB_GETMODE_ASSOC', DB_FETCHMODE_ASSOC); -define('DB_GETMODE_FLIPPED', DB_FETCHMODE_FLIPPED); -/**#@-*/ - - -// }}} -// {{{ tableInfo() && autoPrepare()-related - - -/**#@+ - * The type of information to return from the tableInfo() method. - * - * Bitwised constants, so they can be combined using | - * and removed using ^. - * - * @see DB_common::tableInfo() - * - * {@internal Since the TABLEINFO constants are bitwised, if more of them are - * added in the future, make sure to adjust DB_TABLEINFO_FULL accordingly.}} - */ -define('DB_TABLEINFO_ORDER', 1); -define('DB_TABLEINFO_ORDERTABLE', 2); -define('DB_TABLEINFO_FULL', 3); -/**#@-*/ - - -/**#@+ - * The type of query to create with the automatic query building methods. - * @see DB_common::autoPrepare(), DB_common::autoExecute() - */ -define('DB_AUTOQUERY_INSERT', 1); -define('DB_AUTOQUERY_UPDATE', 2); -/**#@-*/ - - -// }}} -// {{{ portability modes - - -/**#@+ - * Portability Modes. - * - * Bitwised constants, so they can be combined using | - * and removed using ^. - * - * @see DB_common::setOption() - * - * {@internal Since the PORTABILITY constants are bitwised, if more of them are - * added in the future, make sure to adjust DB_PORTABILITY_ALL accordingly.}} - */ - -/** - * Turn off all portability features - */ -define('DB_PORTABILITY_NONE', 0); - -/** - * Convert names of tables and fields to lower case - * when using the get*(), fetch*() and tableInfo() methods - */ -define('DB_PORTABILITY_LOWERCASE', 1); - -/** - * Right trim the data output by get*() and fetch*() - */ -define('DB_PORTABILITY_RTRIM', 2); - -/** - * Force reporting the number of rows deleted - */ -define('DB_PORTABILITY_DELETE_COUNT', 4); - -/** - * Enable hack that makes numRows() work in Oracle - */ -define('DB_PORTABILITY_NUMROWS', 8); - -/** - * Makes certain error messages in certain drivers compatible - * with those from other DBMS's - * - * + mysql, mysqli: change unique/primary key constraints - * DB_ERROR_ALREADY_EXISTS -> DB_ERROR_CONSTRAINT - * - * + odbc(access): MS's ODBC driver reports 'no such field' as code - * 07001, which means 'too few parameters.' When this option is on - * that code gets mapped to DB_ERROR_NOSUCHFIELD. - */ -define('DB_PORTABILITY_ERRORS', 16); - -/** - * Convert null values to empty strings in data output by - * get*() and fetch*() - */ -define('DB_PORTABILITY_NULL_TO_EMPTY', 32); - -/** - * Turn on all portability features - */ -define('DB_PORTABILITY_ALL', 63); -/**#@-*/ - -// }}} - - -// }}} -// {{{ class DB - -/** - * Database independent query interface - * - * The main "DB" class is simply a container class with some static - * methods for creating DB objects as well as some utility functions - * common to all parts of DB. - * - * The object model of DB is as follows (indentation means inheritance): - *
- * DB           The main DB class.  This is simply a utility class
- *              with some "static" methods for creating DB objects as
- *              well as common utility functions for other DB classes.
- *
- * DB_common    The base for each DB implementation.  Provides default
- * |            implementations (in OO lingo virtual methods) for
- * |            the actual DB implementations as well as a bunch of
- * |            query utility functions.
- * |
- * +-DB_mysql   The DB implementation for MySQL.  Inherits DB_common.
- *              When calling DB::factory or DB::connect for MySQL
- *              connections, the object returned is an instance of this
- *              class.
- * 
- * - * @category Database - * @package DB - * @author Stig Bakken - * @author Tomas V.V.Cox - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - */ -class DB -{ - // {{{ &factory() - - /** - * Create a new DB object for the specified database type but don't - * connect to the database - * - * @param string $type the database type (eg "mysql") - * @param array $options an associative array of option names and values - * - * @return object a new DB object. A DB_Error object on failure. - * - * @see DB_common::setOption() - */ - function &factory($type, $options = false) - { - if (!is_array($options)) { - $options = array('persistent' => $options); - } - - if (isset($options['debug']) && $options['debug'] >= 2) { - // expose php errors with sufficient debug level - include_once "DB/{$type}.php"; - } else { - @include_once "DB/{$type}.php"; - } - - $classname = "DB_${type}"; - - if (!class_exists($classname)) { - $tmp = PEAR::raiseError(null, DB_ERROR_NOT_FOUND, null, null, - "Unable to include the DB/{$type}.php" - . " file for '$dsn'", - 'DB_Error', true); - return $tmp; - } - - @$obj =& new $classname; - - foreach ($options as $option => $value) { - $test = $obj->setOption($option, $value); - if (DB::isError($test)) { - return $test; - } - } - - return $obj; - } - - // }}} - // {{{ &connect() - - /** - * Create a new DB object including a connection to the specified database - * - * Example 1. - * - * require_once 'DB.php'; - * - * $dsn = 'pgsql://user:password@host/database'; - * $options = array( - * 'debug' => 2, - * 'portability' => DB_PORTABILITY_ALL, - * ); - * - * $db =& DB::connect($dsn, $options); - * if (PEAR::isError($db)) { - * die($db->getMessage()); - * } - * - * - * @param mixed $dsn the string "data source name" or array in the - * format returned by DB::parseDSN() - * @param array $options an associative array of option names and values - * - * @return object a new DB object. A DB_Error object on failure. - * - * @uses DB_dbase::connect(), DB_fbsql::connect(), DB_ibase::connect(), - * DB_ifx::connect(), DB_msql::connect(), DB_mssql::connect(), - * DB_mysql::connect(), DB_mysqli::connect(), DB_oci8::connect(), - * DB_odbc::connect(), DB_pgsql::connect(), DB_sqlite::connect(), - * DB_sybase::connect() - * - * @uses DB::parseDSN(), DB_common::setOption(), PEAR::isError() - */ - function &connect($dsn, $options = array()) - { - $dsninfo = DB::parseDSN($dsn); - $type = $dsninfo['phptype']; - - if (!is_array($options)) { - /* - * For backwards compatibility. $options used to be boolean, - * indicating whether the connection should be persistent. - */ - $options = array('persistent' => $options); - } - - if (isset($options['debug']) && $options['debug'] >= 2) { - // expose php errors with sufficient debug level - include_once "DB/${type}.php"; - } else { - @include_once "DB/${type}.php"; - } - - $classname = "DB_${type}"; - if (!class_exists($classname)) { - $tmp = PEAR::raiseError(null, DB_ERROR_NOT_FOUND, null, null, - "Unable to include the DB/{$type}.php" - . " file for '$dsn'", - 'DB_Error', true); - return $tmp; - } - - @$obj =& new $classname; - - foreach ($options as $option => $value) { - $test = $obj->setOption($option, $value); - if (DB::isError($test)) { - return $test; - } - } - - $err = $obj->connect($dsninfo, $obj->getOption('persistent')); - if (DB::isError($err)) { - $err->addUserInfo($dsn); - return $err; - } - - return $obj; - } - - // }}} - // {{{ apiVersion() - - /** - * Return the DB API version - * - * @return string the DB API version number - */ - function apiVersion() - { - return '@package_version@'; - } - - // }}} - // {{{ isError() - - /** - * Determines if a variable is a DB_Error object - * - * @param mixed $value the variable to check - * - * @return bool whether $value is DB_Error object - */ - function isError($value) - { - return is_a($value, 'DB_Error'); - } - - // }}} - // {{{ isConnection() - - /** - * Determines if a value is a DB_ object - * - * @param mixed $value the value to test - * - * @return bool whether $value is a DB_ object - */ - function isConnection($value) - { - return (is_object($value) && - is_subclass_of($value, 'db_common') && - method_exists($value, 'simpleQuery')); - } - - // }}} - // {{{ isManip() - - /** - * Tell whether a query is a data manipulation or data definition query - * - * Examples of data manipulation queries are INSERT, UPDATE and DELETE. - * Examples of data definition queries are CREATE, DROP, ALTER, GRANT, - * REVOKE. - * - * @param string $query the query - * - * @return boolean whether $query is a data manipulation query - */ - function isManip($query) - { - $manips = 'INSERT|UPDATE|DELETE|REPLACE|' - . 'CREATE|DROP|' - . 'LOAD DATA|SELECT .* INTO|COPY|' - . 'ALTER|GRANT|REVOKE|' - . 'LOCK|UNLOCK'; - if (preg_match('/^\s*"?(' . $manips . ')\s+/i', $query)) { - return true; - } - return false; - } - - // }}} - // {{{ errorMessage() - - /** - * Return a textual error message for a DB error code - * - * @param integer $value the DB error code - * - * @return string the error message or false if the error code was - * not recognized - */ - function errorMessage($value) - { - static $errorMessages; - if (!isset($errorMessages)) { - $errorMessages = array( - DB_ERROR => 'unknown error', - DB_ERROR_ACCESS_VIOLATION => 'insufficient permissions', - DB_ERROR_ALREADY_EXISTS => 'already exists', - DB_ERROR_CANNOT_CREATE => 'can not create', - DB_ERROR_CANNOT_DROP => 'can not drop', - DB_ERROR_CONNECT_FAILED => 'connect failed', - DB_ERROR_CONSTRAINT => 'constraint violation', - DB_ERROR_CONSTRAINT_NOT_NULL=> 'null value violates not-null constraint', - DB_ERROR_DIVZERO => 'division by zero', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extension not found', - DB_ERROR_INVALID => 'invalid', - DB_ERROR_INVALID_DATE => 'invalid date or time', - DB_ERROR_INVALID_DSN => 'invalid DSN', - DB_ERROR_INVALID_NUMBER => 'invalid number', - DB_ERROR_MISMATCH => 'mismatch', - DB_ERROR_NEED_MORE_DATA => 'insufficient data supplied', - DB_ERROR_NODBSELECTED => 'no database selected', - DB_ERROR_NOSUCHDB => 'no such database', - DB_ERROR_NOSUCHFIELD => 'no such field', - DB_ERROR_NOSUCHTABLE => 'no such table', - DB_ERROR_NOT_CAPABLE => 'DB backend not capable', - DB_ERROR_NOT_FOUND => 'not found', - DB_ERROR_NOT_LOCKED => 'not locked', - DB_ERROR_SYNTAX => 'syntax error', - DB_ERROR_UNSUPPORTED => 'not supported', - DB_ERROR_TRUNCATED => 'truncated', - DB_ERROR_VALUE_COUNT_ON_ROW => 'value count on row', - DB_OK => 'no error', - ); - } - - if (DB::isError($value)) { - $value = $value->getCode(); - } - - return isset($errorMessages[$value]) ? $errorMessages[$value] - : $errorMessages[DB_ERROR]; - } - - // }}} - // {{{ parseDSN() - - /** - * Parse a data source name - * - * Additional keys can be added by appending a URI query string to the - * end of the DSN. - * - * The format of the supplied DSN is in its fullest form: - * - * phptype(dbsyntax)://username:password@protocol+hostspec/database?option=8&another=true - * - * - * Most variations are allowed: - * - * phptype://username:password@protocol+hostspec:110//usr/db_file.db?mode=0644 - * phptype://username:password@hostspec/database_name - * phptype://username:password@hostspec - * phptype://username@hostspec - * phptype://hostspec/database - * phptype://hostspec - * phptype(dbsyntax) - * phptype - * - * - * @param string $dsn Data Source Name to be parsed - * - * @return array an associative array with the following keys: - * + phptype: Database backend used in PHP (mysql, odbc etc.) - * + dbsyntax: Database used with regards to SQL syntax etc. - * + protocol: Communication protocol to use (tcp, unix etc.) - * + hostspec: Host specification (hostname[:port]) - * + database: Database to use on the DBMS server - * + username: User name for login - * + password: Password for login - */ - function parseDSN($dsn) - { - $parsed = array( - 'phptype' => false, - 'dbsyntax' => false, - 'username' => false, - 'password' => false, - 'protocol' => false, - 'hostspec' => false, - 'port' => false, - 'socket' => false, - 'database' => false, - ); - - if (is_array($dsn)) { - $dsn = array_merge($parsed, $dsn); - if (!$dsn['dbsyntax']) { - $dsn['dbsyntax'] = $dsn['phptype']; - } - return $dsn; - } - - // Find phptype and dbsyntax - if (($pos = strpos($dsn, '://')) !== false) { - $str = substr($dsn, 0, $pos); - $dsn = substr($dsn, $pos + 3); - } else { - $str = $dsn; - $dsn = null; - } - - // Get phptype and dbsyntax - // $str => phptype(dbsyntax) - if (preg_match('|^(.+?)\((.*?)\)$|', $str, $arr)) { - $parsed['phptype'] = $arr[1]; - $parsed['dbsyntax'] = !$arr[2] ? $arr[1] : $arr[2]; - } else { - $parsed['phptype'] = $str; - $parsed['dbsyntax'] = $str; - } - - if (!count($dsn)) { - return $parsed; - } - - // Get (if found): username and password - // $dsn => username:password@protocol+hostspec/database - if (($at = strrpos($dsn,'@')) !== false) { - $str = substr($dsn, 0, $at); - $dsn = substr($dsn, $at + 1); - if (($pos = strpos($str, ':')) !== false) { - $parsed['username'] = rawurldecode(substr($str, 0, $pos)); - $parsed['password'] = rawurldecode(substr($str, $pos + 1)); - } else { - $parsed['username'] = rawurldecode($str); - } - } - - // Find protocol and hostspec - - if (preg_match('|^([^(]+)\((.*?)\)/?(.*?)$|', $dsn, $match)) { - // $dsn => proto(proto_opts)/database - $proto = $match[1]; - $proto_opts = $match[2] ? $match[2] : false; - $dsn = $match[3]; - - } else { - // $dsn => protocol+hostspec/database (old format) - if (strpos($dsn, '+') !== false) { - list($proto, $dsn) = explode('+', $dsn, 2); - } - if (strpos($dsn, '/') !== false) { - list($proto_opts, $dsn) = explode('/', $dsn, 2); - } else { - $proto_opts = $dsn; - $dsn = null; - } - } - - // process the different protocol options - $parsed['protocol'] = (!empty($proto)) ? $proto : 'tcp'; - $proto_opts = rawurldecode($proto_opts); - if ($parsed['protocol'] == 'tcp') { - if (strpos($proto_opts, ':') !== false) { - list($parsed['hostspec'], - $parsed['port']) = explode(':', $proto_opts); - } else { - $parsed['hostspec'] = $proto_opts; - } - } elseif ($parsed['protocol'] == 'unix') { - $parsed['socket'] = $proto_opts; - } - - // Get dabase if any - // $dsn => database - if ($dsn) { - if (($pos = strpos($dsn, '?')) === false) { - // /database - $parsed['database'] = rawurldecode($dsn); - } else { - // /database?param1=value1¶m2=value2 - $parsed['database'] = rawurldecode(substr($dsn, 0, $pos)); - $dsn = substr($dsn, $pos + 1); - if (strpos($dsn, '&') !== false) { - $opts = explode('&', $dsn); - } else { // database?param1=value1 - $opts = array($dsn); - } - foreach ($opts as $opt) { - list($key, $value) = explode('=', $opt); - if (!isset($parsed[$key])) { - // don't allow params overwrite - $parsed[$key] = rawurldecode($value); - } - } - } - } - - return $parsed; - } - - // }}} -} - -// }}} -// {{{ class DB_Error - -/** - * DB_Error implements a class for reporting portable database error - * messages - * - * @category Database - * @package DB - * @author Stig Bakken - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - */ -class DB_Error extends PEAR_Error -{ - // {{{ constructor - - /** - * DB_Error constructor - * - * @param mixed $code DB error code, or string with error message - * @param int $mode what "error mode" to operate in - * @param int $level what error level to use for $mode & - * PEAR_ERROR_TRIGGER - * @param mixed $debuginfo additional debug info, such as the last query - * - * @see PEAR_Error - */ - function DB_Error($code = DB_ERROR, $mode = PEAR_ERROR_RETURN, - $level = E_USER_NOTICE, $debuginfo = null) - { - if (is_int($code)) { - $this->PEAR_Error('DB Error: ' . DB::errorMessage($code), $code, - $mode, $level, $debuginfo); - } else { - $this->PEAR_Error("DB Error: $code", DB_ERROR, - $mode, $level, $debuginfo); - } - } - - // }}} -} - -// }}} -// {{{ class DB_result - -/** - * This class implements a wrapper for a DB result set - * - * A new instance of this class will be returned by the DB implementation - * after processing a query that returns data. - * - * @category Database - * @package DB - * @author Stig Bakken - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - */ -class DB_result -{ - // {{{ properties - - /** - * Should results be freed automatically when there are no more rows? - * @var boolean - * @see DB_common::$options - */ - var $autofree; - - /** - * A reference to the DB_ object - * @var object - */ - var $dbh; - - /** - * The current default fetch mode - * @var integer - * @see DB_common::$fetchmode - */ - var $fetchmode; - - /** - * The name of the class into which results should be fetched when - * DB_FETCHMODE_OBJECT is in effect - * - * @var string - * @see DB_common::$fetchmode_object_class - */ - var $fetchmode_object_class; - - /** - * The number of rows to fetch from a limit query - * @var integer - */ - var $limit_count = null; - - /** - * The row to start fetching from in limit queries - * @var integer - */ - var $limit_from = null; - - /** - * The execute parameters that created this result - * @var array - * @since Property available since Release 1.7.0 - */ - var $parameters; - - /** - * The query string that created this result - * - * Copied here incase it changes in $dbh, which is referenced - * - * @var string - * @since Property available since Release 1.7.0 - */ - var $query; - - /** - * The query result resource id created by PHP - * @var resource - */ - var $result; - - /** - * The present row being dealt with - * @var integer - */ - var $row_counter = null; - - /** - * The prepared statement resource id created by PHP in $dbh - * - * This resource is only available when the result set was created using - * a driver's native execute() method, not PEAR DB's emulated one. - * - * Copied here incase it changes in $dbh, which is referenced - * - * {@internal Mainly here because the InterBase/Firebird API is only - * able to retrieve data from result sets if the statemnt handle is - * still in scope.}} - * - * @var resource - * @since Property available since Release 1.7.0 - */ - var $statement; - - - // }}} - // {{{ constructor - - /** - * This constructor sets the object's properties - * - * @param object &$dbh the DB object reference - * @param resource $result the result resource id - * @param array $options an associative array with result options - * - * @return void - */ - function DB_result(&$dbh, $result, $options = array()) - { - $this->autofree = $dbh->options['autofree']; - $this->dbh = &$dbh; - $this->fetchmode = $dbh->fetchmode; - $this->fetchmode_object_class = $dbh->fetchmode_object_class; - $this->parameters = $dbh->last_parameters; - $this->query = $dbh->last_query; - $this->result = $result; - $this->statement = empty($dbh->last_stmt) ? null : $dbh->last_stmt; - foreach ($options as $key => $value) { - $this->setOption($key, $value); - } - } - - /** - * Set options for the DB_result object - * - * @param string $key the option to set - * @param mixed $value the value to set the option to - * - * @return void - */ - function setOption($key, $value = null) - { - switch ($key) { - case 'limit_from': - $this->limit_from = $value; - break; - case 'limit_count': - $this->limit_count = $value; - } - } - - // }}} - // {{{ fetchRow() - - /** - * Fetch a row of data and return it by reference into an array - * - * The type of array returned can be controlled either by setting this - * method's $fetchmode parameter or by changing the default - * fetch mode setFetchMode() before calling this method. - * - * There are two options for standardizing the information returned - * from databases, ensuring their values are consistent when changing - * DBMS's. These portability options can be turned on when creating a - * new DB object or by using setOption(). - * - * + DB_PORTABILITY_LOWERCASE - * convert names of fields to lower case - * - * + DB_PORTABILITY_RTRIM - * right trim the data - * - * @param int $fetchmode the constant indicating how to format the data - * @param int $rownum the row number to fetch (index starts at 0) - * - * @return mixed an array or object containing the row's data, - * NULL when the end of the result set is reached - * or a DB_Error object on failure. - * - * @see DB_common::setOption(), DB_common::setFetchMode() - */ - function &fetchRow($fetchmode = DB_FETCHMODE_DEFAULT, $rownum = null) - { - if ($fetchmode === DB_FETCHMODE_DEFAULT) { - $fetchmode = $this->fetchmode; - } - if ($fetchmode === DB_FETCHMODE_OBJECT) { - $fetchmode = DB_FETCHMODE_ASSOC; - $object_class = $this->fetchmode_object_class; - } - if ($this->limit_from !== null) { - if ($this->row_counter === null) { - $this->row_counter = $this->limit_from; - // Skip rows - if ($this->dbh->features['limit'] === false) { - $i = 0; - while ($i++ < $this->limit_from) { - $this->dbh->fetchInto($this->result, $arr, $fetchmode); - } - } - } - if ($this->row_counter >= ($this->limit_from + $this->limit_count)) - { - if ($this->autofree) { - $this->free(); - } - $tmp = null; - return $tmp; - } - if ($this->dbh->features['limit'] === 'emulate') { - $rownum = $this->row_counter; - } - $this->row_counter++; - } - $res = $this->dbh->fetchInto($this->result, $arr, $fetchmode, $rownum); - if ($res === DB_OK) { - if (isset($object_class)) { - // The default mode is specified in the - // DB_common::fetchmode_object_class property - if ($object_class == 'stdClass') { - $arr = (object) $arr; - } else { - $arr = &new $object_class($arr); - } - } - return $arr; - } - if ($res == null && $this->autofree) { - $this->free(); - } - return $res; - } - - // }}} - // {{{ fetchInto() - - /** - * Fetch a row of data into an array which is passed by reference - * - * The type of array returned can be controlled either by setting this - * method's $fetchmode parameter or by changing the default - * fetch mode setFetchMode() before calling this method. - * - * There are two options for standardizing the information returned - * from databases, ensuring their values are consistent when changing - * DBMS's. These portability options can be turned on when creating a - * new DB object or by using setOption(). - * - * + DB_PORTABILITY_LOWERCASE - * convert names of fields to lower case - * - * + DB_PORTABILITY_RTRIM - * right trim the data - * - * @param array &$arr the variable where the data should be placed - * @param int $fetchmode the constant indicating how to format the data - * @param int $rownum the row number to fetch (index starts at 0) - * - * @return mixed DB_OK if a row is processed, NULL when the end of the - * result set is reached or a DB_Error object on failure - * - * @see DB_common::setOption(), DB_common::setFetchMode() - */ - function fetchInto(&$arr, $fetchmode = DB_FETCHMODE_DEFAULT, $rownum = null) - { - if ($fetchmode === DB_FETCHMODE_DEFAULT) { - $fetchmode = $this->fetchmode; - } - if ($fetchmode === DB_FETCHMODE_OBJECT) { - $fetchmode = DB_FETCHMODE_ASSOC; - $object_class = $this->fetchmode_object_class; - } - if ($this->limit_from !== null) { - if ($this->row_counter === null) { - $this->row_counter = $this->limit_from; - // Skip rows - if ($this->dbh->features['limit'] === false) { - $i = 0; - while ($i++ < $this->limit_from) { - $this->dbh->fetchInto($this->result, $arr, $fetchmode); - } - } - } - if ($this->row_counter >= ( - $this->limit_from + $this->limit_count)) - { - if ($this->autofree) { - $this->free(); - } - return null; - } - if ($this->dbh->features['limit'] === 'emulate') { - $rownum = $this->row_counter; - } - - $this->row_counter++; - } - $res = $this->dbh->fetchInto($this->result, $arr, $fetchmode, $rownum); - if ($res === DB_OK) { - if (isset($object_class)) { - // default mode specified in the - // DB_common::fetchmode_object_class property - if ($object_class == 'stdClass') { - $arr = (object) $arr; - } else { - $arr = new $object_class($arr); - } - } - return DB_OK; - } - if ($res == null && $this->autofree) { - $this->free(); - } - return $res; - } - - // }}} - // {{{ numCols() - - /** - * Get the the number of columns in a result set - * - * @return int the number of columns. A DB_Error object on failure. - */ - function numCols() - { - return $this->dbh->numCols($this->result); - } - - // }}} - // {{{ numRows() - - /** - * Get the number of rows in a result set - * - * @return int the number of rows. A DB_Error object on failure. - */ - function numRows() - { - if ($this->dbh->features['numrows'] === 'emulate' - && $this->dbh->options['portability'] & DB_PORTABILITY_NUMROWS) - { - if ($this->dbh->features['prepare']) { - $res = $this->dbh->query($this->query, $this->parameters); - } else { - $res = $this->dbh->query($this->query); - } - if (DB::isError($res)) { - return $res; - } - $i = 0; - while ($res->fetchInto($tmp, DB_FETCHMODE_ORDERED)) { - $i++; - } - return $i; - } else { - return $this->dbh->numRows($this->result); - } - } - - // }}} - // {{{ nextResult() - - /** - * Get the next result if a batch of queries was executed - * - * @return bool true if a new result is available or false if not - */ - function nextResult() - { - return $this->dbh->nextResult($this->result); - } - - // }}} - // {{{ free() - - /** - * Frees the resources allocated for this result set - * - * @return bool true on success. A DB_Error object on failure. - */ - function free() - { - $err = $this->dbh->freeResult($this->result); - if (DB::isError($err)) { - return $err; - } - $this->result = false; - $this->statement = false; - return true; - } - - // }}} - // {{{ tableInfo() - - /** - * @see DB_common::tableInfo() - * @deprecated Method deprecated some time before Release 1.2 - */ - function tableInfo($mode = null) - { - if (is_string($mode)) { - return $this->dbh->raiseError(DB_ERROR_NEED_MORE_DATA); - } - return $this->dbh->tableInfo($this, $mode); - } - - // }}} - // {{{ getQuery() - - /** - * Determine the query string that created this result - * - * @return string the query string - * - * @since Method available since Release 1.7.0 - */ - function getQuery() - { - return $this->query; - } - - // }}} - // {{{ getRowCounter() - - /** - * Tells which row number is currently being processed - * - * @return integer the current row being looked at. Starts at 1. - */ - function getRowCounter() - { - return $this->row_counter; - } - - // }}} -} - -// }}} -// {{{ class DB_row - -/** - * PEAR DB Row Object - * - * The object contains a row of data from a result set. Each column's data - * is placed in a property named for the column. - * - * @category Database - * @package DB - * @author Stig Bakken - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - * @see DB_common::setFetchMode() - */ -class DB_row -{ - // {{{ constructor - - /** - * The constructor places a row's data into properties of this object - * - * @param array the array containing the row's data - * - * @return void - */ - function DB_row(&$arr) - { - foreach ($arr as $key => $value) { - $this->$key = &$arr[$key]; - } - } - - // }}} -} - -// }}} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ - -?> diff --git a/program/lib/DB/common.php b/program/lib/DB/common.php deleted file mode 100644 index e143c3d..0000000 --- a/program/lib/DB/common.php +++ /dev/null @@ -1,2157 +0,0 @@ - - * @author Tomas V.V. Cox - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: common.php 12 2005-10-02 11:36:35Z sparc $ - * @link http://pear.php.net/package/DB - */ - -/** - * Obtain the PEAR class so it can be extended from - */ -require_once 'PEAR.php'; - -/** - * DB_common is the base class from which each database driver class extends - * - * All common methods are declared here. If a given DBMS driver contains - * a particular method, that method will overload the one here. - * - * @category Database - * @package DB - * @author Stig Bakken - * @author Tomas V.V. Cox - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - */ -class DB_common extends PEAR -{ - // {{{ properties - - /** - * The current default fetch mode - * @var integer - */ - var $fetchmode = DB_FETCHMODE_ORDERED; - - /** - * The name of the class into which results should be fetched when - * DB_FETCHMODE_OBJECT is in effect - * - * @var string - */ - var $fetchmode_object_class = 'stdClass'; - - /** - * Was a connection present when the object was serialized()? - * @var bool - * @see DB_common::__sleep(), DB_common::__wake() - */ - var $was_connected = null; - - /** - * The most recently executed query - * @var string - */ - var $last_query = ''; - - /** - * Run-time configuration options - * - * The 'optimize' option has been deprecated. Use the 'portability' - * option instead. - * - * @var array - * @see DB_common::setOption() - */ - var $options = array( - 'result_buffering' => 500, - 'persistent' => false, - 'ssl' => false, - 'debug' => 0, - 'seqname_format' => '%s_seq', - 'autofree' => false, - 'portability' => DB_PORTABILITY_NONE, - 'optimize' => 'performance', // Deprecated. Use 'portability'. - ); - - /** - * The parameters from the most recently executed query - * @var array - * @since Property available since Release 1.7.0 - */ - var $last_parameters = array(); - - /** - * The elements from each prepared statement - * @var array - */ - var $prepare_tokens = array(); - - /** - * The data types of the various elements in each prepared statement - * @var array - */ - var $prepare_types = array(); - - /** - * The prepared queries - * @var array - */ - var $prepared_queries = array(); - - - // }}} - // {{{ DB_common - - /** - * This constructor calls $this->PEAR('DB_Error') - * - * @return void - */ - function DB_common() - { - $this->PEAR('DB_Error'); - } - - // }}} - // {{{ __sleep() - - /** - * Automatically indicates which properties should be saved - * when PHP's serialize() function is called - * - * @return array the array of properties names that should be saved - */ - function __sleep() - { - if ($this->connection) { - // Don't disconnect(), people use serialize() for many reasons - $this->was_connected = true; - } else { - $this->was_connected = false; - } - if (isset($this->autocommit)) { - return array('autocommit', - 'dbsyntax', - 'dsn', - 'features', - 'fetchmode', - 'fetchmode_object_class', - 'options', - 'was_connected', - ); - } else { - return array('dbsyntax', - 'dsn', - 'features', - 'fetchmode', - 'fetchmode_object_class', - 'options', - 'was_connected', - ); - } - } - - // }}} - // {{{ __wakeup() - - /** - * Automatically reconnects to the database when PHP's unserialize() - * function is called - * - * The reconnection attempt is only performed if the object was connected - * at the time PHP's serialize() function was run. - * - * @return void - */ - function __wakeup() - { - if ($this->was_connected) { - $this->connect($this->dsn, $this->options); - } - } - - // }}} - // {{{ __toString() - - /** - * Automatic string conversion for PHP 5 - * - * @return string a string describing the current PEAR DB object - * - * @since Method available since Release 1.7.0 - */ - function __toString() - { - $info = strtolower(get_class($this)); - $info .= ': (phptype=' . $this->phptype . - ', dbsyntax=' . $this->dbsyntax . - ')'; - if ($this->connection) { - $info .= ' [connected]'; - } - return $info; - } - - // }}} - // {{{ toString() - - /** - * DEPRECATED: String conversion method - * - * @return string a string describing the current PEAR DB object - * - * @deprecated Method deprecated in Release 1.7.0 - */ - function toString() - { - return $this->__toString(); - } - - // }}} - // {{{ quoteString() - - /** - * DEPRECATED: Quotes a string so it can be safely used within string - * delimiters in a query - * - * @param string $string the string to be quoted - * - * @return string the quoted string - * - * @see DB_common::quoteSmart(), DB_common::escapeSimple() - * @deprecated Method deprecated some time before Release 1.2 - */ - function quoteString($string) - { - $string = $this->quote($string); - if ($string{0} == "'") { - return substr($string, 1, -1); - } - return $string; - } - - // }}} - // {{{ quote() - - /** - * DEPRECATED: Quotes a string so it can be safely used in a query - * - * @param string $string the string to quote - * - * @return string the quoted string or the string NULL - * if the value submitted is null. - * - * @see DB_common::quoteSmart(), DB_common::escapeSimple() - * @deprecated Deprecated in release 1.6.0 - */ - function quote($string = null) - { - return ($string === null) ? 'NULL' - : "'" . str_replace("'", "''", $string) . "'"; - } - - // }}} - // {{{ quoteIdentifier() - - /** - * Quotes a string so it can be safely used as a table or column name - * - * Delimiting style depends on which database driver is being used. - * - * NOTE: just because you CAN use delimited identifiers doesn't mean - * you SHOULD use them. In general, they end up causing way more - * problems than they solve. - * - * Portability is broken by using the following characters inside - * delimited identifiers: - * + backtick (`) -- due to MySQL - * + double quote (") -- due to Oracle - * + brackets ([ or ]) -- due to Access - * - * Delimited identifiers are known to generally work correctly under - * the following drivers: - * + mssql - * + mysql - * + mysqli - * + oci8 - * + odbc(access) - * + odbc(db2) - * + pgsql - * + sqlite - * + sybase (must execute set quoted_identifier on sometime - * prior to use) - * - * InterBase doesn't seem to be able to use delimited identifiers - * via PHP 4. They work fine under PHP 5. - * - * @param string $str the identifier name to be quoted - * - * @return string the quoted identifier - * - * @since Method available since Release 1.6.0 - */ - function quoteIdentifier($str) - { - return '"' . str_replace('"', '""', $str) . '"'; - } - - // }}} - // {{{ quoteSmart() - - /** - * Formats input so it can be safely used in a query - * - * The output depends on the PHP data type of input and the database - * type being used. - * - * @param mixed $in the data to be formatted - * - * @return mixed the formatted data. The format depends on the input's - * PHP type: - *
    - *
  • - * input -> returns - *
  • - *
  • - * null -> the string NULL - *
  • - *
  • - * integer or double -> the unquoted number - *
  • - *
  • - * bool -> output depends on the driver in use - * Most drivers return integers: 1 if - * true or 0 if - * false. - * Some return strings: TRUE if - * true or FALSE if - * false. - * Finally one returns strings: T if - * true or F if - * false. Here is a list of each DBMS, - * the values returned and the suggested column type: - *
      - *
    • - * dbase -> T/F - * (Logical) - *
    • - *
    • - * fbase -> TRUE/FALSE - * (BOOLEAN) - *
    • - *
    • - * ibase -> 1/0 - * (SMALLINT) [1] - *
    • - *
    • - * ifx -> 1/0 - * (SMALLINT) [1] - *
    • - *
    • - * msql -> 1/0 - * (INTEGER) - *
    • - *
    • - * mssql -> 1/0 - * (BIT) - *
    • - *
    • - * mysql -> 1/0 - * (TINYINT(1)) - *
    • - *
    • - * mysqli -> 1/0 - * (TINYINT(1)) - *
    • - *
    • - * oci8 -> 1/0 - * (NUMBER(1)) - *
    • - *
    • - * odbc -> 1/0 - * (SMALLINT) [1] - *
    • - *
    • - * pgsql -> TRUE/FALSE - * (BOOLEAN) - *
    • - *
    • - * sqlite -> 1/0 - * (INTEGER) - *
    • - *
    • - * sybase -> 1/0 - * (TINYINT(1)) - *
    • - *
    - * [1] Accommodate the lowest common denominator because not all - * versions of have BOOLEAN. - *
  • - *
  • - * other (including strings and numeric strings) -> - * the data with single quotes escaped by preceeding - * single quotes, backslashes are escaped by preceeding - * backslashes, then the whole string is encapsulated - * between single quotes - *
  • - *
- * - * @see DB_common::escapeSimple() - * @since Method available since Release 1.6.0 - */ - function quoteSmart($in) - { - if (is_int($in) || is_double($in)) { - return $in; - } elseif (is_bool($in)) { - return $in ? 1 : 0; - } elseif (is_null($in)) { - return 'NULL'; - } else { - return "'" . $this->escapeSimple($in) . "'"; - } - } - - // }}} - // {{{ escapeSimple() - - /** - * Escapes a string according to the current DBMS's standards - * - * In SQLite, this makes things safe for inserts/updates, but may - * cause problems when performing text comparisons against columns - * containing binary data. See the - * {@link http://php.net/sqlite_escape_string PHP manual} for more info. - * - * @param string $str the string to be escaped - * - * @return string the escaped string - * - * @see DB_common::quoteSmart() - * @since Method available since Release 1.6.0 - */ - function escapeSimple($str) - { - return str_replace("'", "''", $str); - } - - // }}} - // {{{ provides() - - /** - * Tells whether the present driver supports a given feature - * - * @param string $feature the feature you're curious about - * - * @return bool whether this driver supports $feature - */ - function provides($feature) - { - return $this->features[$feature]; - } - - // }}} - // {{{ setFetchMode() - - /** - * Sets the fetch mode that should be used by default for query results - * - * @param integer $fetchmode DB_FETCHMODE_ORDERED, DB_FETCHMODE_ASSOC - * or DB_FETCHMODE_OBJECT - * @param string $object_class the class name of the object to be returned - * by the fetch methods when the - * DB_FETCHMODE_OBJECT mode is selected. - * If no class is specified by default a cast - * to object from the assoc array row will be - * done. There is also the posibility to use - * and extend the 'DB_row' class. - * - * @see DB_FETCHMODE_ORDERED, DB_FETCHMODE_ASSOC, DB_FETCHMODE_OBJECT - */ - function setFetchMode($fetchmode, $object_class = 'stdClass') - { - switch ($fetchmode) { - case DB_FETCHMODE_OBJECT: - $this->fetchmode_object_class = $object_class; - case DB_FETCHMODE_ORDERED: - case DB_FETCHMODE_ASSOC: - $this->fetchmode = $fetchmode; - break; - default: - return $this->raiseError('invalid fetchmode mode'); - } - } - - // }}} - // {{{ setOption() - - /** - * Sets run-time configuration options for PEAR DB - * - * Options, their data types, default values and description: - *
    - *
  • - * autofree boolean = false - *
    should results be freed automatically when there are no - * more rows? - *
  • - * result_buffering integer = 500 - *
    how many rows of the result set should be buffered? - *
    In mysql: mysql_unbuffered_query() is used instead of - * mysql_query() if this value is 0. (Release 1.7.0) - *
    In oci8: this value is passed to ocisetprefetch(). - * (Release 1.7.0) - *
  • - * debug integer = 0 - *
    debug level - *
  • - * persistent boolean = false - *
    should the connection be persistent? - *
  • - * portability integer = DB_PORTABILITY_NONE - *
    portability mode constant (see below) - *
  • - * seqname_format string = %s_seq - *
    the sprintf() format string used on sequence names. This - * format is applied to sequence names passed to - * createSequence(), nextID() and dropSequence(). - *
  • - * ssl boolean = false - *
    use ssl to connect? - *
  • - *
- * - * ----------------------------------------- - * - * PORTABILITY MODES - * - * These modes are bitwised, so they can be combined using | - * and removed using ^. See the examples section below on how - * to do this. - * - * DB_PORTABILITY_NONE - * turn off all portability features - * - * This mode gets automatically turned on if the deprecated - * optimize option gets set to performance. - * - * - * DB_PORTABILITY_LOWERCASE - * convert names of tables and fields to lower case when using - * get*(), fetch*() and tableInfo() - * - * This mode gets automatically turned on in the following databases - * if the deprecated option optimize gets set to - * portability: - * + oci8 - * - * - * DB_PORTABILITY_RTRIM - * right trim the data output by get*() fetch*() - * - * - * DB_PORTABILITY_DELETE_COUNT - * force reporting the number of rows deleted - * - * Some DBMS's don't count the number of rows deleted when performing - * simple DELETE FROM tablename queries. This portability - * mode tricks such DBMS's into telling the count by adding - * WHERE 1=1 to the end of DELETE queries. - * - * This mode gets automatically turned on in the following databases - * if the deprecated option optimize gets set to - * portability: - * + fbsql - * + mysql - * + mysqli - * + sqlite - * - * - * DB_PORTABILITY_NUMROWS - * enable hack that makes numRows() work in Oracle - * - * This mode gets automatically turned on in the following databases - * if the deprecated option optimize gets set to - * portability: - * + oci8 - * - * - * DB_PORTABILITY_ERRORS - * makes certain error messages in certain drivers compatible - * with those from other DBMS's - * - * + mysql, mysqli: change unique/primary key constraints - * DB_ERROR_ALREADY_EXISTS -> DB_ERROR_CONSTRAINT - * - * + odbc(access): MS's ODBC driver reports 'no such field' as code - * 07001, which means 'too few parameters.' When this option is on - * that code gets mapped to DB_ERROR_NOSUCHFIELD. - * DB_ERROR_MISMATCH -> DB_ERROR_NOSUCHFIELD - * - * DB_PORTABILITY_NULL_TO_EMPTY - * convert null values to empty strings in data output by get*() and - * fetch*(). Needed because Oracle considers empty strings to be null, - * while most other DBMS's know the difference between empty and null. - * - * - * DB_PORTABILITY_ALL - * turn on all portability features - * - * ----------------------------------------- - * - * Example 1. Simple setOption() example - * - * $db->setOption('autofree', true); - * - * - * Example 2. Portability for lowercasing and trimming - * - * $db->setOption('portability', - * DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_RTRIM); - * - * - * Example 3. All portability options except trimming - * - * $db->setOption('portability', - * DB_PORTABILITY_ALL ^ DB_PORTABILITY_RTRIM); - * - * - * @param string $option option name - * @param mixed $value value for the option - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::$options - */ - function setOption($option, $value) - { - if (isset($this->options[$option])) { - $this->options[$option] = $value; - - /* - * Backwards compatibility check for the deprecated 'optimize' - * option. Done here in case settings change after connecting. - */ - if ($option == 'optimize') { - if ($value == 'portability') { - switch ($this->phptype) { - case 'oci8': - $this->options['portability'] = - DB_PORTABILITY_LOWERCASE | - DB_PORTABILITY_NUMROWS; - break; - case 'fbsql': - case 'mysql': - case 'mysqli': - case 'sqlite': - $this->options['portability'] = - DB_PORTABILITY_DELETE_COUNT; - break; - } - } else { - $this->options['portability'] = DB_PORTABILITY_NONE; - } - } - - return DB_OK; - } - return $this->raiseError("unknown option $option"); - } - - // }}} - // {{{ getOption() - - /** - * Returns the value of an option - * - * @param string $option the option name you're curious about - * - * @return mixed the option's value - */ - function getOption($option) - { - if (isset($this->options[$option])) { - return $this->options[$option]; - } - return $this->raiseError("unknown option $option"); - } - - // }}} - // {{{ prepare() - - /** - * Prepares a query for multiple execution with execute() - * - * Creates a query that can be run multiple times. Each time it is run, - * the placeholders, if any, will be replaced by the contents of - * execute()'s $data argument. - * - * Three types of placeholders can be used: - * + ? scalar value (i.e. strings, integers). The system - * will automatically quote and escape the data. - * + ! value is inserted 'as is' - * + & requires a file name. The file's contents get - * inserted into the query (i.e. saving binary - * data in a db) - * - * Example 1. - * - * $sth = $db->prepare('INSERT INTO tbl (a, b, c) VALUES (?, !, &)'); - * $data = array( - * "John's text", - * "'it''s good'", - * 'filename.txt' - * ); - * $res = $db->execute($sth, $data); - * - * - * Use backslashes to escape placeholder characters if you don't want - * them to be interpreted as placeholders: - *
-     *    "UPDATE foo SET col=? WHERE col='over \& under'"
-     * 
- * - * With some database backends, this is emulated. - * - * {@internal ibase and oci8 have their own prepare() methods.}} - * - * @param string $query the query to be prepared - * - * @return mixed DB statement resource on success. A DB_Error object - * on failure. - * - * @see DB_common::execute() - */ - function prepare($query) - { - $tokens = preg_split('/((?prepare_tokens[] = &$newtokens; - end($this->prepare_tokens); - - $k = key($this->prepare_tokens); - $this->prepare_types[$k] = $types; - $this->prepared_queries[$k] = implode(' ', $newtokens); - - return $k; - } - - // }}} - // {{{ autoPrepare() - - /** - * Automaticaly generates an insert or update query and pass it to prepare() - * - * @param string $table the table name - * @param array $table_fields the array of field names - * @param int $mode a type of query to make: - * DB_AUTOQUERY_INSERT or DB_AUTOQUERY_UPDATE - * @param string $where for update queries: the WHERE clause to - * append to the SQL statement. Don't - * include the "WHERE" keyword. - * - * @return resource the query handle - * - * @uses DB_common::prepare(), DB_common::buildManipSQL() - */ - function autoPrepare($table, $table_fields, $mode = DB_AUTOQUERY_INSERT, - $where = false) - { - $query = $this->buildManipSQL($table, $table_fields, $mode, $where); - if (DB::isError($query)) { - return $query; - } - return $this->prepare($query); - } - - // }}} - // {{{ autoExecute() - - /** - * Automaticaly generates an insert or update query and call prepare() - * and execute() with it - * - * @param string $table the table name - * @param array $fields_values the associative array where $key is a - * field name and $value its value - * @param int $mode a type of query to make: - * DB_AUTOQUERY_INSERT or DB_AUTOQUERY_UPDATE - * @param string $where for update queries: the WHERE clause to - * append to the SQL statement. Don't - * include the "WHERE" keyword. - * - * @return mixed a new DB_result object for successful SELECT queries - * or DB_OK for successul data manipulation queries. - * A DB_Error object on failure. - * - * @uses DB_common::autoPrepare(), DB_common::execute() - */ - function autoExecute($table, $fields_values, $mode = DB_AUTOQUERY_INSERT, - $where = false) - { - $sth = $this->autoPrepare($table, array_keys($fields_values), $mode, - $where); - if (DB::isError($sth)) { - return $sth; - } - $ret =& $this->execute($sth, array_values($fields_values)); - $this->freePrepared($sth); - return $ret; - - } - - // }}} - // {{{ buildManipSQL() - - /** - * Produces an SQL query string for autoPrepare() - * - * Example: - *
-     * buildManipSQL('table_sql', array('field1', 'field2', 'field3'),
-     *               DB_AUTOQUERY_INSERT);
-     * 
- * - * That returns - * - * INSERT INTO table_sql (field1,field2,field3) VALUES (?,?,?) - * - * - * NOTES: - * - This belongs more to a SQL Builder class, but this is a simple - * facility. - * - Be carefull! If you don't give a $where param with an UPDATE - * query, all the records of the table will be updated! - * - * @param string $table the table name - * @param array $table_fields the array of field names - * @param int $mode a type of query to make: - * DB_AUTOQUERY_INSERT or DB_AUTOQUERY_UPDATE - * @param string $where for update queries: the WHERE clause to - * append to the SQL statement. Don't - * include the "WHERE" keyword. - * - * @return string the sql query for autoPrepare() - */ - function buildManipSQL($table, $table_fields, $mode, $where = false) - { - if (count($table_fields) == 0) { - return $this->raiseError(DB_ERROR_NEED_MORE_DATA); - } - $first = true; - switch ($mode) { - case DB_AUTOQUERY_INSERT: - $values = ''; - $names = ''; - foreach ($table_fields as $value) { - if ($first) { - $first = false; - } else { - $names .= ','; - $values .= ','; - } - $names .= $value; - $values .= '?'; - } - return "INSERT INTO $table ($names) VALUES ($values)"; - case DB_AUTOQUERY_UPDATE: - $set = ''; - foreach ($table_fields as $value) { - if ($first) { - $first = false; - } else { - $set .= ','; - } - $set .= "$value = ?"; - } - $sql = "UPDATE $table SET $set"; - if ($where) { - $sql .= " WHERE $where"; - } - return $sql; - default: - return $this->raiseError(DB_ERROR_SYNTAX); - } - } - - // }}} - // {{{ execute() - - /** - * Executes a DB statement prepared with prepare() - * - * Example 1. - * - * $sth = $db->prepare('INSERT INTO tbl (a, b, c) VALUES (?, !, &)'); - * $data = array( - * "John's text", - * "'it''s good'", - * 'filename.txt' - * ); - * $res =& $db->execute($sth, $data); - * - * - * @param resource $stmt a DB statement resource returned from prepare() - * @param mixed $data array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 placeholder for non-array - * parameters or 1 placeholder per array element. - * - * @return mixed a new DB_result object for successful SELECT queries - * or DB_OK for successul data manipulation queries. - * A DB_Error object on failure. - * - * {@internal ibase and oci8 have their own execute() methods.}} - * - * @see DB_common::prepare() - */ - function &execute($stmt, $data = array()) - { - $realquery = $this->executeEmulateQuery($stmt, $data); - if (DB::isError($realquery)) { - return $realquery; - } - $result = $this->simpleQuery($realquery); - - if ($result === DB_OK || DB::isError($result)) { - return $result; - } else { - $tmp =& new DB_result($this, $result); - return $tmp; - } - } - - // }}} - // {{{ executeEmulateQuery() - - /** - * Emulates executing prepared statements if the DBMS not support them - * - * @param resource $stmt a DB statement resource returned from execute() - * @param mixed $data array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 placeholder for non-array - * parameters or 1 placeholder per array element. - * - * @return mixed a string containing the real query run when emulating - * prepare/execute. A DB_Error object on failure. - * - * @access protected - * @see DB_common::execute() - */ - function executeEmulateQuery($stmt, $data = array()) - { - $stmt = (int)$stmt; - $data = (array)$data; - $this->last_parameters = $data; - - if (count($this->prepare_types[$stmt]) != count($data)) { - $this->last_query = $this->prepared_queries[$stmt]; - return $this->raiseError(DB_ERROR_MISMATCH); - } - - $realquery = $this->prepare_tokens[$stmt][0]; - - $i = 0; - foreach ($data as $value) { - if ($this->prepare_types[$stmt][$i] == DB_PARAM_SCALAR) { - $realquery .= $this->quoteSmart($value); - } elseif ($this->prepare_types[$stmt][$i] == DB_PARAM_OPAQUE) { - $fp = @fopen($value, 'rb'); - if (!$fp) { - return $this->raiseError(DB_ERROR_ACCESS_VIOLATION); - } - $realquery .= $this->quoteSmart(fread($fp, filesize($value))); - fclose($fp); - } else { - $realquery .= $value; - } - - $realquery .= $this->prepare_tokens[$stmt][++$i]; - } - - return $realquery; - } - - // }}} - // {{{ executeMultiple() - - /** - * Performs several execute() calls on the same statement handle - * - * $data must be an array indexed numerically - * from 0, one execute call is done for every "row" in the array. - * - * If an error occurs during execute(), executeMultiple() does not - * execute the unfinished rows, but rather returns that error. - * - * @param resource $stmt query handle from prepare() - * @param array $data numeric array containing the - * data to insert into the query - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::prepare(), DB_common::execute() - */ - function executeMultiple($stmt, $data) - { - foreach ($data as $value) { - $res =& $this->execute($stmt, $value); - if (DB::isError($res)) { - return $res; - } - } - return DB_OK; - } - - // }}} - // {{{ freePrepared() - - /** - * Frees the internal resources associated with a prepared query - * - * @param resource $stmt the prepared statement's PHP resource - * @param bool $free_resource should the PHP resource be freed too? - * Use false if you need to get data - * from the result set later. - * - * @return bool TRUE on success, FALSE if $result is invalid - * - * @see DB_common::prepare() - */ - function freePrepared($stmt, $free_resource = true) - { - $stmt = (int)$stmt; - if (isset($this->prepare_tokens[$stmt])) { - unset($this->prepare_tokens[$stmt]); - unset($this->prepare_types[$stmt]); - unset($this->prepared_queries[$stmt]); - return true; - } - return false; - } - - // }}} - // {{{ modifyQuery() - - /** - * Changes a query string for various DBMS specific reasons - * - * It is defined here to ensure all drivers have this method available. - * - * @param string $query the query string to modify - * - * @return string the modified query string - * - * @access protected - * @see DB_mysql::modifyQuery(), DB_oci8::modifyQuery(), - * DB_sqlite::modifyQuery() - */ - function modifyQuery($query) - { - return $query; - } - - // }}} - // {{{ modifyLimitQuery() - - /** - * Adds LIMIT clauses to a query string according to current DBMS standards - * - * It is defined here to assure that all implementations - * have this method defined. - * - * @param string $query the query to modify - * @param int $from the row to start to fetching (0 = the first row) - * @param int $count the numbers of rows to fetch - * @param mixed $params array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 placeholder for non-array - * parameters or 1 placeholder per array element. - * - * @return string the query string with LIMIT clauses added - * - * @access protected - */ - function modifyLimitQuery($query, $from, $count, $params = array()) - { - return $query; - } - - // }}} - // {{{ query() - - /** - * Sends a query to the database server - * - * The query string can be either a normal statement to be sent directly - * to the server OR if $params are passed the query can have - * placeholders and it will be passed through prepare() and execute(). - * - * @param string $query the SQL query or the statement to prepare - * @param mixed $params array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 placeholder for non-array - * parameters or 1 placeholder per array element. - * - * @return mixed a new DB_result object for successful SELECT queries - * or DB_OK for successul data manipulation queries. - * A DB_Error object on failure. - * - * @see DB_result, DB_common::prepare(), DB_common::execute() - */ - function &query($query, $params = array()) - { - if (sizeof($params) > 0) { - $sth = $this->prepare($query); - if (DB::isError($sth)) { - return $sth; - } - $ret =& $this->execute($sth, $params); - $this->freePrepared($sth, false); - return $ret; - } else { - $this->last_parameters = array(); - $result = $this->simpleQuery($query); - if ($result === DB_OK || DB::isError($result)) { - return $result; - } else { - $tmp =& new DB_result($this, $result); - return $tmp; - } - } - } - - // }}} - // {{{ limitQuery() - - /** - * Generates and executes a LIMIT query - * - * @param string $query the query - * @param intr $from the row to start to fetching (0 = the first row) - * @param int $count the numbers of rows to fetch - * @param mixed $params array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 placeholder for non-array - * parameters or 1 placeholder per array element. - * - * @return mixed a new DB_result object for successful SELECT queries - * or DB_OK for successul data manipulation queries. - * A DB_Error object on failure. - */ - function &limitQuery($query, $from, $count, $params = array()) - { - $query = $this->modifyLimitQuery($query, $from, $count, $params); - if (DB::isError($query)){ - return $query; - } - $result =& $this->query($query, $params); - if (is_a($result, 'DB_result')) { - $result->setOption('limit_from', $from); - $result->setOption('limit_count', $count); - } - return $result; - } - - // }}} - // {{{ getOne() - - /** - * Fetches the first column of the first row from a query result - * - * Takes care of doing the query and freeing the results when finished. - * - * @param string $query the SQL query - * @param mixed $params array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 placeholder for non-array - * parameters or 1 placeholder per array element. - * - * @return mixed the returned value of the query. - * A DB_Error object on failure. - */ - function &getOne($query, $params = array()) - { - $params = (array)$params; - // modifyLimitQuery() would be nice here, but it causes BC issues - if (sizeof($params) > 0) { - $sth = $this->prepare($query); - if (DB::isError($sth)) { - return $sth; - } - $res =& $this->execute($sth, $params); - $this->freePrepared($sth); - } else { - $res =& $this->query($query); - } - - if (DB::isError($res)) { - return $res; - } - - $err = $res->fetchInto($row, DB_FETCHMODE_ORDERED); - $res->free(); - - if ($err !== DB_OK) { - return $err; - } - - return $row[0]; - } - - // }}} - // {{{ getRow() - - /** - * Fetches the first row of data returned from a query result - * - * Takes care of doing the query and freeing the results when finished. - * - * @param string $query the SQL query - * @param mixed $params array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 placeholder for non-array - * parameters or 1 placeholder per array element. - * @param int $fetchmode the fetch mode to use - * - * @return array the first row of results as an array. - * A DB_Error object on failure. - */ - function &getRow($query, $params = array(), - $fetchmode = DB_FETCHMODE_DEFAULT) - { - // compat check, the params and fetchmode parameters used to - // have the opposite order - if (!is_array($params)) { - if (is_array($fetchmode)) { - if ($params === null) { - $tmp = DB_FETCHMODE_DEFAULT; - } else { - $tmp = $params; - } - $params = $fetchmode; - $fetchmode = $tmp; - } elseif ($params !== null) { - $fetchmode = $params; - $params = array(); - } - } - // modifyLimitQuery() would be nice here, but it causes BC issues - if (sizeof($params) > 0) { - $sth = $this->prepare($query); - if (DB::isError($sth)) { - return $sth; - } - $res =& $this->execute($sth, $params); - $this->freePrepared($sth); - } else { - $res =& $this->query($query); - } - - if (DB::isError($res)) { - return $res; - } - - $err = $res->fetchInto($row, $fetchmode); - - $res->free(); - - if ($err !== DB_OK) { - return $err; - } - - return $row; - } - - // }}} - // {{{ getCol() - - /** - * Fetches a single column from a query result and returns it as an - * indexed array - * - * @param string $query the SQL query - * @param mixed $col which column to return (integer [column number, - * starting at 0] or string [column name]) - * @param mixed $params array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 placeholder for non-array - * parameters or 1 placeholder per array element. - * - * @return array the results as an array. A DB_Error object on failure. - * - * @see DB_common::query() - */ - function &getCol($query, $col = 0, $params = array()) - { - $params = (array)$params; - if (sizeof($params) > 0) { - $sth = $this->prepare($query); - - if (DB::isError($sth)) { - return $sth; - } - - $res =& $this->execute($sth, $params); - $this->freePrepared($sth); - } else { - $res =& $this->query($query); - } - - if (DB::isError($res)) { - return $res; - } - - $fetchmode = is_int($col) ? DB_FETCHMODE_ORDERED : DB_FETCHMODE_ASSOC; - - if (!is_array($row = $res->fetchRow($fetchmode))) { - $ret = array(); - } else { - if (!array_key_exists($col, $row)) { - $ret =& $this->raiseError(DB_ERROR_NOSUCHFIELD); - } else { - $ret = array($row[$col]); - while (is_array($row = $res->fetchRow($fetchmode))) { - $ret[] = $row[$col]; - } - } - } - - $res->free(); - - if (DB::isError($row)) { - $ret = $row; - } - - return $ret; - } - - // }}} - // {{{ getAssoc() - - /** - * Fetches an entire query result and returns it as an - * associative array using the first column as the key - * - * If the result set contains more than two columns, the value - * will be an array of the values from column 2-n. If the result - * set contains only two columns, the returned value will be a - * scalar with the value of the second column (unless forced to an - * array with the $force_array parameter). A DB error code is - * returned on errors. If the result set contains fewer than two - * columns, a DB_ERROR_TRUNCATED error is returned. - * - * For example, if the table "mytable" contains: - * - *
-     *  ID      TEXT       DATE
-     * --------------------------------
-     *  1       'one'      944679408
-     *  2       'two'      944679408
-     *  3       'three'    944679408
-     * 
- * - * Then the call getAssoc('SELECT id,text FROM mytable') returns: - *
-     *   array(
-     *     '1' => 'one',
-     *     '2' => 'two',
-     *     '3' => 'three',
-     *   )
-     * 
- * - * ...while the call getAssoc('SELECT id,text,date FROM mytable') returns: - *
-     *   array(
-     *     '1' => array('one', '944679408'),
-     *     '2' => array('two', '944679408'),
-     *     '3' => array('three', '944679408')
-     *   )
-     * 
- * - * If the more than one row occurs with the same value in the - * first column, the last row overwrites all previous ones by - * default. Use the $group parameter if you don't want to - * overwrite like this. Example: - * - *
-     * getAssoc('SELECT category,id,name FROM mytable', false, null,
-     *          DB_FETCHMODE_ASSOC, true) returns:
-     *
-     *   array(
-     *     '1' => array(array('id' => '4', 'name' => 'number four'),
-     *                  array('id' => '6', 'name' => 'number six')
-     *            ),
-     *     '9' => array(array('id' => '4', 'name' => 'number four'),
-     *                  array('id' => '6', 'name' => 'number six')
-     *            )
-     *   )
-     * 
- * - * Keep in mind that database functions in PHP usually return string - * values for results regardless of the database's internal type. - * - * @param string $query the SQL query - * @param bool $force_array used only when the query returns - * exactly two columns. If true, the values - * of the returned array will be one-element - * arrays instead of scalars. - * @param mixed $params array, string or numeric data to be used in - * execution of the statement. Quantity of - * items passed must match quantity of - * placeholders in query: meaning 1 - * placeholder for non-array parameters or - * 1 placeholder per array element. - * @param int $fetchmode the fetch mode to use - * @param bool $group if true, the values of the returned array - * is wrapped in another array. If the same - * key value (in the first column) repeats - * itself, the values will be appended to - * this array instead of overwriting the - * existing values. - * - * @return array the associative array containing the query results. - * A DB_Error object on failure. - */ - function &getAssoc($query, $force_array = false, $params = array(), - $fetchmode = DB_FETCHMODE_DEFAULT, $group = false) - { - $params = (array)$params; - if (sizeof($params) > 0) { - $sth = $this->prepare($query); - - if (DB::isError($sth)) { - return $sth; - } - - $res =& $this->execute($sth, $params); - $this->freePrepared($sth); - } else { - $res =& $this->query($query); - } - - if (DB::isError($res)) { - return $res; - } - if ($fetchmode == DB_FETCHMODE_DEFAULT) { - $fetchmode = $this->fetchmode; - } - $cols = $res->numCols(); - - if ($cols < 2) { - $tmp =& $this->raiseError(DB_ERROR_TRUNCATED); - return $tmp; - } - - $results = array(); - - if ($cols > 2 || $force_array) { - // return array values - // XXX this part can be optimized - if ($fetchmode == DB_FETCHMODE_ASSOC) { - while (is_array($row = $res->fetchRow(DB_FETCHMODE_ASSOC))) { - reset($row); - $key = current($row); - unset($row[key($row)]); - if ($group) { - $results[$key][] = $row; - } else { - $results[$key] = $row; - } - } - } elseif ($fetchmode == DB_FETCHMODE_OBJECT) { - while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { - $arr = get_object_vars($row); - $key = current($arr); - if ($group) { - $results[$key][] = $row; - } else { - $results[$key] = $row; - } - } - } else { - while (is_array($row = $res->fetchRow(DB_FETCHMODE_ORDERED))) { - // we shift away the first element to get - // indices running from 0 again - $key = array_shift($row); - if ($group) { - $results[$key][] = $row; - } else { - $results[$key] = $row; - } - } - } - if (DB::isError($row)) { - $results = $row; - } - } else { - // return scalar values - while (is_array($row = $res->fetchRow(DB_FETCHMODE_ORDERED))) { - if ($group) { - $results[$row[0]][] = $row[1]; - } else { - $results[$row[0]] = $row[1]; - } - } - if (DB::isError($row)) { - $results = $row; - } - } - - $res->free(); - - return $results; - } - - // }}} - // {{{ getAll() - - /** - * Fetches all of the rows from a query result - * - * @param string $query the SQL query - * @param mixed $params array, string or numeric data to be used in - * execution of the statement. Quantity of - * items passed must match quantity of - * placeholders in query: meaning 1 - * placeholder for non-array parameters or - * 1 placeholder per array element. - * @param int $fetchmode the fetch mode to use: - * + DB_FETCHMODE_ORDERED - * + DB_FETCHMODE_ASSOC - * + DB_FETCHMODE_ORDERED | DB_FETCHMODE_FLIPPED - * + DB_FETCHMODE_ASSOC | DB_FETCHMODE_FLIPPED - * - * @return array the nested array. A DB_Error object on failure. - */ - function &getAll($query, $params = array(), - $fetchmode = DB_FETCHMODE_DEFAULT) - { - // compat check, the params and fetchmode parameters used to - // have the opposite order - if (!is_array($params)) { - if (is_array($fetchmode)) { - if ($params === null) { - $tmp = DB_FETCHMODE_DEFAULT; - } else { - $tmp = $params; - } - $params = $fetchmode; - $fetchmode = $tmp; - } elseif ($params !== null) { - $fetchmode = $params; - $params = array(); - } - } - - if (sizeof($params) > 0) { - $sth = $this->prepare($query); - - if (DB::isError($sth)) { - return $sth; - } - - $res =& $this->execute($sth, $params); - $this->freePrepared($sth); - } else { - $res =& $this->query($query); - } - - if ($res === DB_OK || DB::isError($res)) { - return $res; - } - - $results = array(); - while (DB_OK === $res->fetchInto($row, $fetchmode)) { - if ($fetchmode & DB_FETCHMODE_FLIPPED) { - foreach ($row as $key => $val) { - $results[$key][] = $val; - } - } else { - $results[] = $row; - } - } - - $res->free(); - - if (DB::isError($row)) { - $tmp =& $this->raiseError($row); - return $tmp; - } - return $results; - } - - // }}} - // {{{ autoCommit() - - /** - * Enables or disables automatic commits - * - * @param bool $onoff true turns it on, false turns it off - * - * @return int DB_OK on success. A DB_Error object if the driver - * doesn't support auto-committing transactions. - */ - function autoCommit($onoff = false) - { - return $this->raiseError(DB_ERROR_NOT_CAPABLE); - } - - // }}} - // {{{ commit() - - /** - * Commits the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function commit() - { - return $this->raiseError(DB_ERROR_NOT_CAPABLE); - } - - // }}} - // {{{ rollback() - - /** - * Reverts the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function rollback() - { - return $this->raiseError(DB_ERROR_NOT_CAPABLE); - } - - // }}} - // {{{ numRows() - - /** - * Determines the number of rows in a query result - * - * @param resource $result the query result idenifier produced by PHP - * - * @return int the number of rows. A DB_Error object on failure. - */ - function numRows($result) - { - return $this->raiseError(DB_ERROR_NOT_CAPABLE); - } - - // }}} - // {{{ affectedRows() - - /** - * Determines the number of rows affected by a data maniuplation query - * - * 0 is returned for queries that don't manipulate data. - * - * @return int the number of rows. A DB_Error object on failure. - */ - function affectedRows() - { - return $this->raiseError(DB_ERROR_NOT_CAPABLE); - } - - // }}} - // {{{ getSequenceName() - - /** - * Generates the name used inside the database for a sequence - * - * The createSequence() docblock contains notes about storing sequence - * names. - * - * @param string $sqn the sequence's public name - * - * @return string the sequence's name in the backend - * - * @access protected - * @see DB_common::createSequence(), DB_common::dropSequence(), - * DB_common::nextID(), DB_common::setOption() - */ - function getSequenceName($sqn) - { - return sprintf($this->getOption('seqname_format'), - preg_replace('/[^a-z0-9_.]/i', '_', $sqn)); - } - - // }}} - // {{{ nextId() - - /** - * Returns the next free id in a sequence - * - * @param string $seq_name name of the sequence - * @param boolean $ondemand when true, the seqence is automatically - * created if it does not exist - * - * @return int the next id number in the sequence. - * A DB_Error object on failure. - * - * @see DB_common::createSequence(), DB_common::dropSequence(), - * DB_common::getSequenceName() - */ - function nextId($seq_name, $ondemand = true) - { - return $this->raiseError(DB_ERROR_NOT_CAPABLE); - } - - // }}} - // {{{ createSequence() - - /** - * Creates a new sequence - * - * The name of a given sequence is determined by passing the string - * provided in the $seq_name argument through PHP's sprintf() - * function using the value from the seqname_format option as - * the sprintf()'s format argument. - * - * seqname_format is set via setOption(). - * - * @param string $seq_name name of the new sequence - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::dropSequence(), DB_common::getSequenceName(), - * DB_common::nextID() - */ - function createSequence($seq_name) - { - return $this->raiseError(DB_ERROR_NOT_CAPABLE); - } - - // }}} - // {{{ dropSequence() - - /** - * Deletes a sequence - * - * @param string $seq_name name of the sequence to be deleted - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::createSequence(), DB_common::getSequenceName(), - * DB_common::nextID() - */ - function dropSequence($seq_name) - { - return $this->raiseError(DB_ERROR_NOT_CAPABLE); - } - - // }}} - // {{{ raiseError() - - /** - * Communicates an error and invoke error callbacks, etc - * - * Basically a wrapper for PEAR::raiseError without the message string. - * - * @param mixed integer error code, or a PEAR error object (all - * other parameters are ignored if this parameter is - * an object - * @param int error mode, see PEAR_Error docs - * @param mixed if error mode is PEAR_ERROR_TRIGGER, this is the - * error level (E_USER_NOTICE etc). If error mode is - * PEAR_ERROR_CALLBACK, this is the callback function, - * either as a function name, or as an array of an - * object and method name. For other error modes this - * parameter is ignored. - * @param string extra debug information. Defaults to the last - * query and native error code. - * @param mixed native error code, integer or string depending the - * backend - * - * @return object the PEAR_Error object - * - * @see PEAR_Error - */ - function &raiseError($code = DB_ERROR, $mode = null, $options = null, - $userinfo = null, $nativecode = null) - { - // The error is yet a DB error object - if (is_object($code)) { - // because we the static PEAR::raiseError, our global - // handler should be used if it is set - if ($mode === null && !empty($this->_default_error_mode)) { - $mode = $this->_default_error_mode; - $options = $this->_default_error_options; - } - $tmp = PEAR::raiseError($code, null, $mode, $options, - null, null, true); - return $tmp; - } - - if ($userinfo === null) { - $userinfo = $this->last_query; - } - - if ($nativecode) { - $userinfo .= ' [nativecode=' . trim($nativecode) . ']'; - } else { - $userinfo .= ' [DB Error: ' . DB::errorMessage($code) . ']'; - } - - $tmp = PEAR::raiseError(null, $code, $mode, $options, $userinfo, - 'DB_Error', true); - return $tmp; - } - - // }}} - // {{{ errorNative() - - /** - * Gets the DBMS' native error code produced by the last query - * - * @return mixed the DBMS' error code. A DB_Error object on failure. - */ - function errorNative() - { - return $this->raiseError(DB_ERROR_NOT_CAPABLE); - } - - // }}} - // {{{ errorCode() - - /** - * Maps native error codes to DB's portable ones - * - * Uses the $errorcode_map property defined in each driver. - * - * @param string|int $nativecode the error code returned by the DBMS - * - * @return int the portable DB error code. Return DB_ERROR if the - * current driver doesn't have a mapping for the - * $nativecode submitted. - */ - function errorCode($nativecode) - { - if (isset($this->errorcode_map[$nativecode])) { - return $this->errorcode_map[$nativecode]; - } - // Fall back to DB_ERROR if there was no mapping. - return DB_ERROR; - } - - // }}} - // {{{ errorMessage() - - /** - * Maps a DB error code to a textual message - * - * @param integer $dbcode the DB error code - * - * @return string the error message corresponding to the error code - * submitted. FALSE if the error code is unknown. - * - * @see DB::errorMessage() - */ - function errorMessage($dbcode) - { - return DB::errorMessage($this->errorcode_map[$dbcode]); - } - - // }}} - // {{{ tableInfo() - - /** - * Returns information about a table or a result set - * - * The format of the resulting array depends on which $mode - * you select. The sample output below is based on this query: - *
-     *    SELECT tblFoo.fldID, tblFoo.fldPhone, tblBar.fldId
-     *    FROM tblFoo
-     *    JOIN tblBar ON tblFoo.fldId = tblBar.fldId
-     * 
- * - *
    - *
  • - * - * null (default) - *
    -     *   [0] => Array (
    -     *       [table] => tblFoo
    -     *       [name] => fldId
    -     *       [type] => int
    -     *       [len] => 11
    -     *       [flags] => primary_key not_null
    -     *   )
    -     *   [1] => Array (
    -     *       [table] => tblFoo
    -     *       [name] => fldPhone
    -     *       [type] => string
    -     *       [len] => 20
    -     *       [flags] =>
    -     *   )
    -     *   [2] => Array (
    -     *       [table] => tblBar
    -     *       [name] => fldId
    -     *       [type] => int
    -     *       [len] => 11
    -     *       [flags] => primary_key not_null
    -     *   )
    -     *   
    - * - *
  • - * - * DB_TABLEINFO_ORDER - * - *

    In addition to the information found in the default output, - * a notation of the number of columns is provided by the - * num_fields element while the order - * element provides an array with the column names as the keys and - * their location index number (corresponding to the keys in the - * the default output) as the values.

    - * - *

    If a result set has identical field names, the last one is - * used.

    - * - *
    -     *   [num_fields] => 3
    -     *   [order] => Array (
    -     *       [fldId] => 2
    -     *       [fldTrans] => 1
    -     *   )
    -     *   
    - * - *
  • - * - * DB_TABLEINFO_ORDERTABLE - * - *

    Similar to DB_TABLEINFO_ORDER but adds more - * dimensions to the array in which the table names are keys and - * the field names are sub-keys. This is helpful for queries that - * join tables which have identical field names.

    - * - *
    -     *   [num_fields] => 3
    -     *   [ordertable] => Array (
    -     *       [tblFoo] => Array (
    -     *           [fldId] => 0
    -     *           [fldPhone] => 1
    -     *       )
    -     *       [tblBar] => Array (
    -     *           [fldId] => 2
    -     *       )
    -     *   )
    -     *   
    - * - *
  • - *
- * - * The flags element contains a space separated list - * of extra information about the field. This data is inconsistent - * between DBMS's due to the way each DBMS works. - * + primary_key - * + unique_key - * + multiple_key - * + not_null - * - * Most DBMS's only provide the table and flags - * elements if $result is a table name. The following DBMS's - * provide full information from queries: - * + fbsql - * + mysql - * - * If the 'portability' option has DB_PORTABILITY_LOWERCASE - * turned on, the names of tables and fields will be lowercased. - * - * @param object|string $result DB_result object from a query or a - * string containing the name of a table. - * While this also accepts a query result - * resource identifier, this behavior is - * deprecated. - * @param int $mode either unused or one of the tableInfo modes: - * DB_TABLEINFO_ORDERTABLE, - * DB_TABLEINFO_ORDER or - * DB_TABLEINFO_FULL (which does both). - * These are bitwise, so the first two can be - * combined using |. - * - * @return array an associative array with the information requested. - * A DB_Error object on failure. - * - * @see DB_common::setOption() - */ - function tableInfo($result, $mode = null) - { - /* - * If the DB_ class has a tableInfo() method, that one - * overrides this one. But, if the driver doesn't have one, - * this method runs and tells users about that fact. - */ - return $this->raiseError(DB_ERROR_NOT_CAPABLE); - } - - // }}} - // {{{ getTables() - - /** - * Lists the tables in the current database - * - * @return array the list of tables. A DB_Error object on failure. - * - * @deprecated Method deprecated some time before Release 1.2 - */ - function getTables() - { - return $this->getListOf('tables'); - } - - // }}} - // {{{ getListOf() - - /** - * Lists internal database information - * - * @param string $type type of information being sought. - * Common items being sought are: - * tables, databases, users, views, functions - * Each DBMS's has its own capabilities. - * - * @return array an array listing the items sought. - * A DB DB_Error object on failure. - */ - function getListOf($type) - { - $sql = $this->getSpecialQuery($type); - if ($sql === null) { - $this->last_query = ''; - return $this->raiseError(DB_ERROR_UNSUPPORTED); - } elseif (is_int($sql) || DB::isError($sql)) { - // Previous error - return $this->raiseError($sql); - } elseif (is_array($sql)) { - // Already the result - return $sql; - } - // Launch this query - return $this->getCol($sql); - } - - // }}} - // {{{ getSpecialQuery() - - /** - * Obtains the query string needed for listing a given type of objects - * - * @param string $type the kind of objects you want to retrieve - * - * @return string the SQL query string or null if the driver doesn't - * support the object type requested - * - * @access protected - * @see DB_common::getListOf() - */ - function getSpecialQuery($type) - { - return $this->raiseError(DB_ERROR_UNSUPPORTED); - } - - // }}} - // {{{ _rtrimArrayValues() - - /** - * Right-trims all strings in an array - * - * @param array $array the array to be trimmed (passed by reference) - * - * @return void - * - * @access protected - */ - function _rtrimArrayValues(&$array) - { - foreach ($array as $key => $value) { - if (is_string($value)) { - $array[$key] = rtrim($value); - } - } - } - - // }}} - // {{{ _convertNullArrayValuesToEmpty() - - /** - * Converts all null values in an array to empty strings - * - * @param array $array the array to be de-nullified (passed by reference) - * - * @return void - * - * @access protected - */ - function _convertNullArrayValuesToEmpty(&$array) - { - foreach ($array as $key => $value) { - if (is_null($value)) { - $array[$key] = ''; - } - } - } - - // }}} -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ - -?> diff --git a/program/lib/DB/dbase.php b/program/lib/DB/dbase.php deleted file mode 100644 index b1f8d0c..0000000 --- a/program/lib/DB/dbase.php +++ /dev/null @@ -1,510 +0,0 @@ - - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: dbase.php 12 2005-10-02 11:36:35Z sparc $ - * @link http://pear.php.net/package/DB - */ - -/** - * Obtain the DB_common class so it can be extended from - */ -require_once 'DB/common.php'; - -/** - * The methods PEAR DB uses to interact with PHP's dbase extension - * for interacting with dBase databases - * - * These methods overload the ones declared in DB_common. - * - * @category Database - * @package DB - * @author Tomas V.V. Cox - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - */ -class DB_dbase extends DB_common -{ - // {{{ properties - - /** - * The DB driver type (mysql, oci8, odbc, etc.) - * @var string - */ - var $phptype = 'dbase'; - - /** - * The database syntax variant to be used (db2, access, etc.), if any - * @var string - */ - var $dbsyntax = 'dbase'; - - /** - * The capabilities of this DB implementation - * - * The 'new_link' element contains the PHP version that first provided - * new_link support for this DBMS. Contains false if it's unsupported. - * - * Meaning of the 'limit' element: - * + 'emulate' = emulate with fetch row by number - * + 'alter' = alter the query - * + false = skip rows - * - * @var array - */ - var $features = array( - 'limit' => false, - 'new_link' => false, - 'numrows' => true, - 'pconnect' => false, - 'prepare' => false, - 'ssl' => false, - 'transactions' => false, - ); - - /** - * A mapping of native error codes to DB error codes - * @var array - */ - var $errorcode_map = array( - ); - - /** - * The raw database connection created by PHP - * @var resource - */ - var $connection; - - /** - * The DSN information for connecting to a database - * @var array - */ - var $dsn = array(); - - - /** - * A means of emulating result resources - * @var array - */ - var $res_row = array(); - - /** - * The quantity of results so far - * - * For emulating result resources. - * - * @var integer - */ - var $result = 0; - - /** - * Maps dbase data type id's to human readable strings - * - * The human readable values are based on the output of PHP's - * dbase_get_header_info() function. - * - * @var array - * @since Property available since Release 1.7.0 - */ - var $types = array( - 'C' => 'character', - 'D' => 'date', - 'L' => 'boolean', - 'M' => 'memo', - 'N' => 'number', - ); - - - // }}} - // {{{ constructor - - /** - * This constructor calls $this->DB_common() - * - * @return void - */ - function DB_dbase() - { - $this->DB_common(); - } - - // }}} - // {{{ connect() - - /** - * Connect to the database and create it if it doesn't exist - * - * Don't call this method directly. Use DB::connect() instead. - * - * PEAR DB's dbase driver supports the following extra DSN options: - * + mode An integer specifying the read/write mode to use - * (0 = read only, 1 = write only, 2 = read/write). - * Available since PEAR DB 1.7.0. - * + fields An array of arrays that PHP's dbase_create() function needs - * to create a new database. This information is used if the - * dBase file specified in the "database" segment of the DSN - * does not exist. For more info, see the PHP manual's - * {@link http://php.net/dbase_create dbase_create()} page. - * Available since PEAR DB 1.7.0. - * - * Example of how to connect and establish a new dBase file if necessary: - * - * require_once 'DB.php'; - * - * $dsn = array( - * 'phptype' => 'dbase', - * 'database' => '/path/and/name/of/dbase/file', - * 'mode' => 2, - * 'fields' => array( - * array('a', 'N', 5, 0), - * array('b', 'C', 40), - * array('c', 'C', 255), - * array('d', 'C', 20), - * ), - * ); - * $options = array( - * 'debug' => 2, - * 'portability' => DB_PORTABILITY_ALL, - * ); - * - * $db =& DB::connect($dsn, $options); - * if (PEAR::isError($db)) { - * die($db->getMessage()); - * } - * - * - * @param array $dsn the data source name - * @param bool $persistent should the connection be persistent? - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function connect($dsn, $persistent = false) - { - if (!PEAR::loadExtension('dbase')) { - return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND); - } - - $this->dsn = $dsn; - if ($dsn['dbsyntax']) { - $this->dbsyntax = $dsn['dbsyntax']; - } - - /* - * Turn track_errors on for entire script since $php_errormsg - * is the only way to find errors from the dbase extension. - */ - ini_set('track_errors', 1); - $php_errormsg = ''; - - if (!file_exists($dsn['database'])) { - $this->dsn['mode'] = 2; - if (empty($dsn['fields']) || !is_array($dsn['fields'])) { - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - 'the dbase file does not exist and ' - . 'it could not be created because ' - . 'the "fields" element of the DSN ' - . 'is not properly set'); - } - $this->connection = @dbase_create($dsn['database'], - $dsn['fields']); - if (!$this->connection) { - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - 'the dbase file does not exist and ' - . 'the attempt to create it failed: ' - . $php_errormsg); - } - } else { - if (!isset($this->dsn['mode'])) { - $this->dsn['mode'] = 0; - } - $this->connection = @dbase_open($dsn['database'], - $this->dsn['mode']); - if (!$this->connection) { - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - $php_errormsg); - } - } - return DB_OK; - } - - // }}} - // {{{ disconnect() - - /** - * Disconnects from the database server - * - * @return bool TRUE on success, FALSE on failure - */ - function disconnect() - { - $ret = @dbase_close($this->connection); - $this->connection = null; - return $ret; - } - - // }}} - // {{{ &query() - - function &query($query = null) - { - // emulate result resources - $this->res_row[(int)$this->result] = 0; - $tmp =& new DB_result($this, $this->result++); - return $tmp; - } - - // }}} - // {{{ fetchInto() - - /** - * Places a row from the result set into the given array - * - * Formating of the array and the data therein are configurable. - * See DB_result::fetchInto() for more information. - * - * This method is not meant to be called directly. Use - * DB_result::fetchInto() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result the query result resource - * @param array $arr the referenced array to put the data in - * @param int $fetchmode how the resulting array should be indexed - * @param int $rownum the row number to fetch (0 = first row) - * - * @return mixed DB_OK on success, NULL when the end of a result set is - * reached or on failure - * - * @see DB_result::fetchInto() - */ - function fetchInto($result, &$arr, $fetchmode, $rownum = null) - { - if ($rownum === null) { - $rownum = $this->res_row[(int)$result]++; - } - if ($fetchmode & DB_FETCHMODE_ASSOC) { - $arr = @dbase_get_record_with_names($this->connection, $rownum); - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE && $arr) { - $arr = array_change_key_case($arr, CASE_LOWER); - } - } else { - $arr = @dbase_get_record($this->connection, $rownum); - } - if (!$arr) { - return null; - } - if ($this->options['portability'] & DB_PORTABILITY_RTRIM) { - $this->_rtrimArrayValues($arr); - } - if ($this->options['portability'] & DB_PORTABILITY_NULL_TO_EMPTY) { - $this->_convertNullArrayValuesToEmpty($arr); - } - return DB_OK; - } - - // }}} - // {{{ numCols() - - /** - * Gets the number of columns in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numCols() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of columns. A DB_Error object on failure. - * - * @see DB_result::numCols() - */ - function numCols($foo) - { - return @dbase_numfields($this->connection); - } - - // }}} - // {{{ numRows() - - /** - * Gets the number of rows in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numRows() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of rows. A DB_Error object on failure. - * - * @see DB_result::numRows() - */ - function numRows($foo) - { - return @dbase_numrecords($this->connection); - } - - // }}} - // {{{ quoteSmart() - - /** - * Formats input so it can be safely used in a query - * - * @param mixed $in the data to be formatted - * - * @return mixed the formatted data. The format depends on the input's - * PHP type: - * + null = the string NULL - * + boolean = T if true or - * F if false. Use the Logical - * data type. - * + integer or double = the unquoted number - * + other (including strings and numeric strings) = - * the data with single quotes escaped by preceeding - * single quotes then the whole string is encapsulated - * between single quotes - * - * @see DB_common::quoteSmart() - * @since Method available since Release 1.6.0 - */ - function quoteSmart($in) - { - if (is_int($in) || is_double($in)) { - return $in; - } elseif (is_bool($in)) { - return $in ? 'T' : 'F'; - } elseif (is_null($in)) { - return 'NULL'; - } else { - return "'" . $this->escapeSimple($in) . "'"; - } - } - - // }}} - // {{{ tableInfo() - - /** - * Returns information about the current database - * - * @param mixed $result THIS IS UNUSED IN DBASE. The current database - * is examined regardless of what is provided here. - * @param int $mode a valid tableInfo mode - * - * @return array an associative array with the information requested. - * A DB_Error object on failure. - * - * @see DB_common::tableInfo() - * @since Method available since Release 1.7.0 - */ - function tableInfo($result = null, $mode = null) - { - if (function_exists('dbase_get_header_info')) { - $id = @dbase_get_header_info($this->connection); - if (!$id && $php_errormsg) { - return $this->raiseError(DB_ERROR, - null, null, null, - $php_errormsg); - } - } else { - /* - * This segment for PHP 4 is loosely based on code by - * Hadi Rusiah in the comments on - * the dBase reference page in the PHP manual. - */ - $db = @fopen($this->dsn['database'], 'r'); - if (!$db) { - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - $php_errormsg); - } - - $id = array(); - $i = 0; - - $line = fread($db, 32); - while (!feof($db)) { - $line = fread($db, 32); - if (substr($line, 0, 1) == chr(13)) { - break; - } else { - $pos = strpos(substr($line, 0, 10), chr(0)); - $pos = ($pos == 0 ? 10 : $pos); - $id[$i] = array( - 'name' => substr($line, 0, $pos), - 'type' => $this->types[substr($line, 11, 1)], - 'length' => ord(substr($line, 16, 1)), - 'precision' => ord(substr($line, 17, 1)), - ); - } - $i++; - } - - fclose($db); - } - - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) { - $case_func = 'strtolower'; - } else { - $case_func = 'strval'; - } - - $res = array(); - $count = count($id); - - if ($mode) { - $res['num_fields'] = $count; - } - - for ($i = 0; $i < $count; $i++) { - $res[$i] = array( - 'table' => $this->dsn['database'], - 'name' => $case_func($id[$i]['name']), - 'type' => $id[$i]['type'], - 'len' => $id[$i]['length'], - 'flags' => '' - ); - if ($mode & DB_TABLEINFO_ORDER) { - $res['order'][$res[$i]['name']] = $i; - } - if ($mode & DB_TABLEINFO_ORDERTABLE) { - $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i; - } - } - - return $res; - } - - // }}} -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ - -?> diff --git a/program/lib/DB/fbsql.php b/program/lib/DB/fbsql.php deleted file mode 100644 index 431c0d4..0000000 --- a/program/lib/DB/fbsql.php +++ /dev/null @@ -1,770 +0,0 @@ - - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: fbsql.php 12 2005-10-02 11:36:35Z sparc $ - * @link http://pear.php.net/package/DB - */ - -/** - * Obtain the DB_common class so it can be extended from - */ -require_once 'DB/common.php'; - -/** - * The methods PEAR DB uses to interact with PHP's fbsql extension - * for interacting with FrontBase databases - * - * These methods overload the ones declared in DB_common. - * - * @category Database - * @package DB - * @author Frank M. Kromann - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - * @since Class functional since Release 1.7.0 - */ -class DB_fbsql extends DB_common -{ - // {{{ properties - - /** - * The DB driver type (mysql, oci8, odbc, etc.) - * @var string - */ - var $phptype = 'fbsql'; - - /** - * The database syntax variant to be used (db2, access, etc.), if any - * @var string - */ - var $dbsyntax = 'fbsql'; - - /** - * The capabilities of this DB implementation - * - * The 'new_link' element contains the PHP version that first provided - * new_link support for this DBMS. Contains false if it's unsupported. - * - * Meaning of the 'limit' element: - * + 'emulate' = emulate with fetch row by number - * + 'alter' = alter the query - * + false = skip rows - * - * @var array - */ - var $features = array( - 'limit' => 'alter', - 'new_link' => false, - 'numrows' => true, - 'pconnect' => true, - 'prepare' => false, - 'ssl' => false, - 'transactions' => true, - ); - - /** - * A mapping of native error codes to DB error codes - * @var array - */ - var $errorcode_map = array( - 22 => DB_ERROR_SYNTAX, - 85 => DB_ERROR_ALREADY_EXISTS, - 108 => DB_ERROR_SYNTAX, - 116 => DB_ERROR_NOSUCHTABLE, - 124 => DB_ERROR_VALUE_COUNT_ON_ROW, - 215 => DB_ERROR_NOSUCHFIELD, - 217 => DB_ERROR_INVALID_NUMBER, - 226 => DB_ERROR_NOSUCHFIELD, - 231 => DB_ERROR_INVALID, - 239 => DB_ERROR_TRUNCATED, - 251 => DB_ERROR_SYNTAX, - 266 => DB_ERROR_NOT_FOUND, - 357 => DB_ERROR_CONSTRAINT_NOT_NULL, - 358 => DB_ERROR_CONSTRAINT, - 360 => DB_ERROR_CONSTRAINT, - 361 => DB_ERROR_CONSTRAINT, - ); - - /** - * The raw database connection created by PHP - * @var resource - */ - var $connection; - - /** - * The DSN information for connecting to a database - * @var array - */ - var $dsn = array(); - - - // }}} - // {{{ constructor - - /** - * This constructor calls $this->DB_common() - * - * @return void - */ - function DB_fbsql() - { - $this->DB_common(); - } - - // }}} - // {{{ connect() - - /** - * Connect to the database server, log in and open the database - * - * Don't call this method directly. Use DB::connect() instead. - * - * @param array $dsn the data source name - * @param bool $persistent should the connection be persistent? - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function connect($dsn, $persistent = false) - { - if (!PEAR::loadExtension('fbsql')) { - return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND); - } - - $this->dsn = $dsn; - if ($dsn['dbsyntax']) { - $this->dbsyntax = $dsn['dbsyntax']; - } - - $params = array( - $dsn['hostspec'] ? $dsn['hostspec'] : 'localhost', - $dsn['username'] ? $dsn['username'] : null, - $dsn['password'] ? $dsn['password'] : null, - ); - - $connect_function = $persistent ? 'fbsql_pconnect' : 'fbsql_connect'; - - $ini = ini_get('track_errors'); - $php_errormsg = ''; - if ($ini) { - $this->connection = @call_user_func_array($connect_function, - $params); - } else { - ini_set('track_errors', 1); - $this->connection = @call_user_func_array($connect_function, - $params); - ini_set('track_errors', $ini); - } - - if (!$this->connection) { - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - $php_errormsg); - } - - if ($dsn['database']) { - if (!@fbsql_select_db($dsn['database'], $this->connection)) { - return $this->fbsqlRaiseError(); - } - } - - return DB_OK; - } - - // }}} - // {{{ disconnect() - - /** - * Disconnects from the database server - * - * @return bool TRUE on success, FALSE on failure - */ - function disconnect() - { - $ret = @fbsql_close($this->connection); - $this->connection = null; - return $ret; - } - - // }}} - // {{{ simpleQuery() - - /** - * Sends a query to the database server - * - * @param string the SQL query string - * - * @return mixed + a PHP result resrouce for successful SELECT queries - * + the DB_OK constant for other successful queries - * + a DB_Error object on failure - */ - function simpleQuery($query) - { - $this->last_query = $query; - $query = $this->modifyQuery($query); - $result = @fbsql_query("$query;", $this->connection); - if (!$result) { - return $this->fbsqlRaiseError(); - } - // Determine which queries that should return data, and which - // should return an error code only. - if (DB::isManip($query)) { - return DB_OK; - } - return $result; - } - - // }}} - // {{{ nextResult() - - /** - * Move the internal fbsql result pointer to the next available result - * - * @param a valid fbsql result resource - * - * @access public - * - * @return true if a result is available otherwise return false - */ - function nextResult($result) - { - return @fbsql_next_result($result); - } - - // }}} - // {{{ fetchInto() - - /** - * Places a row from the result set into the given array - * - * Formating of the array and the data therein are configurable. - * See DB_result::fetchInto() for more information. - * - * This method is not meant to be called directly. Use - * DB_result::fetchInto() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result the query result resource - * @param array $arr the referenced array to put the data in - * @param int $fetchmode how the resulting array should be indexed - * @param int $rownum the row number to fetch (0 = first row) - * - * @return mixed DB_OK on success, NULL when the end of a result set is - * reached or on failure - * - * @see DB_result::fetchInto() - */ - function fetchInto($result, &$arr, $fetchmode, $rownum = null) - { - if ($rownum !== null) { - if (!@fbsql_data_seek($result, $rownum)) { - return null; - } - } - if ($fetchmode & DB_FETCHMODE_ASSOC) { - $arr = @fbsql_fetch_array($result, FBSQL_ASSOC); - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE && $arr) { - $arr = array_change_key_case($arr, CASE_LOWER); - } - } else { - $arr = @fbsql_fetch_row($result); - } - if (!$arr) { - return null; - } - if ($this->options['portability'] & DB_PORTABILITY_RTRIM) { - $this->_rtrimArrayValues($arr); - } - if ($this->options['portability'] & DB_PORTABILITY_NULL_TO_EMPTY) { - $this->_convertNullArrayValuesToEmpty($arr); - } - return DB_OK; - } - - // }}} - // {{{ freeResult() - - /** - * Deletes the result set and frees the memory occupied by the result set - * - * This method is not meant to be called directly. Use - * DB_result::free() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return bool TRUE on success, FALSE if $result is invalid - * - * @see DB_result::free() - */ - function freeResult($result) - { - return @fbsql_free_result($result); - } - - // }}} - // {{{ autoCommit() - - /** - * Enables or disables automatic commits - * - * @param bool $onoff true turns it on, false turns it off - * - * @return int DB_OK on success. A DB_Error object if the driver - * doesn't support auto-committing transactions. - */ - function autoCommit($onoff=false) - { - if ($onoff) { - $this->query("SET COMMIT TRUE"); - } else { - $this->query("SET COMMIT FALSE"); - } - } - - // }}} - // {{{ commit() - - /** - * Commits the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function commit() - { - @fbsql_commit(); - } - - // }}} - // {{{ rollback() - - /** - * Reverts the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function rollback() - { - @fbsql_rollback(); - } - - // }}} - // {{{ numCols() - - /** - * Gets the number of columns in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numCols() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of columns. A DB_Error object on failure. - * - * @see DB_result::numCols() - */ - function numCols($result) - { - $cols = @fbsql_num_fields($result); - if (!$cols) { - return $this->fbsqlRaiseError(); - } - return $cols; - } - - // }}} - // {{{ numRows() - - /** - * Gets the number of rows in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numRows() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of rows. A DB_Error object on failure. - * - * @see DB_result::numRows() - */ - function numRows($result) - { - $rows = @fbsql_num_rows($result); - if ($rows === null) { - return $this->fbsqlRaiseError(); - } - return $rows; - } - - // }}} - // {{{ affectedRows() - - /** - * Determines the number of rows affected by a data maniuplation query - * - * 0 is returned for queries that don't manipulate data. - * - * @return int the number of rows. A DB_Error object on failure. - */ - function affectedRows() - { - if (DB::isManip($this->last_query)) { - $result = @fbsql_affected_rows($this->connection); - } else { - $result = 0; - } - return $result; - } - - // }}} - // {{{ nextId() - - /** - * Returns the next free id in a sequence - * - * @param string $seq_name name of the sequence - * @param boolean $ondemand when true, the seqence is automatically - * created if it does not exist - * - * @return int the next id number in the sequence. - * A DB_Error object on failure. - * - * @see DB_common::nextID(), DB_common::getSequenceName(), - * DB_fbsql::createSequence(), DB_fbsql::dropSequence() - */ - function nextId($seq_name, $ondemand = true) - { - $seqname = $this->getSequenceName($seq_name); - do { - $repeat = 0; - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $result = $this->query('SELECT UNIQUE FROM ' . $seqname); - $this->popErrorHandling(); - if ($ondemand && DB::isError($result) && - $result->getCode() == DB_ERROR_NOSUCHTABLE) { - $repeat = 1; - $result = $this->createSequence($seq_name); - if (DB::isError($result)) { - return $result; - } - } else { - $repeat = 0; - } - } while ($repeat); - if (DB::isError($result)) { - return $this->fbsqlRaiseError(); - } - $result->fetchInto($tmp, DB_FETCHMODE_ORDERED); - return $tmp[0]; - } - - /** - * Creates a new sequence - * - * @param string $seq_name name of the new sequence - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::createSequence(), DB_common::getSequenceName(), - * DB_fbsql::nextID(), DB_fbsql::dropSequence() - */ - function createSequence($seq_name) - { - $seqname = $this->getSequenceName($seq_name); - $res = $this->query('CREATE TABLE ' . $seqname - . ' (id INTEGER NOT NULL,' - . ' PRIMARY KEY(id))'); - if ($res) { - $res = $this->query('SET UNIQUE = 0 FOR ' . $seqname); - } - return $res; - } - - // }}} - // {{{ dropSequence() - - /** - * Deletes a sequence - * - * @param string $seq_name name of the sequence to be deleted - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::dropSequence(), DB_common::getSequenceName(), - * DB_fbsql::nextID(), DB_fbsql::createSequence() - */ - function dropSequence($seq_name) - { - return $this->query('DROP TABLE ' . $this->getSequenceName($seq_name) - . ' RESTRICT'); - } - - // }}} - // {{{ modifyLimitQuery() - - /** - * Adds LIMIT clauses to a query string according to current DBMS standards - * - * @param string $query the query to modify - * @param int $from the row to start to fetching (0 = the first row) - * @param int $count the numbers of rows to fetch - * @param mixed $params array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 placeholder for non-array - * parameters or 1 placeholder per array element. - * - * @return string the query string with LIMIT clauses added - * - * @access protected - */ - function modifyLimitQuery($query, $from, $count, $params = array()) - { - if (DB::isManip($query)) { - return preg_replace('/^([\s(])*SELECT/i', - "\\1SELECT TOP($count)", $query); - } else { - return preg_replace('/([\s(])*SELECT/i', - "\\1SELECT TOP($from, $count)", $query); - } - } - - // }}} - // {{{ quoteSmart() - - /** - * Formats input so it can be safely used in a query - * - * @param mixed $in the data to be formatted - * - * @return mixed the formatted data. The format depends on the input's - * PHP type: - * + null = the string NULL - * + boolean = string TRUE or FALSE - * + integer or double = the unquoted number - * + other (including strings and numeric strings) = - * the data escaped according to FrontBase's settings - * then encapsulated between single quotes - * - * @see DB_common::quoteSmart() - * @since Method available since Release 1.6.0 - */ - function quoteSmart($in) - { - if (is_int($in) || is_double($in)) { - return $in; - } elseif (is_bool($in)) { - return $in ? 'TRUE' : 'FALSE'; - } elseif (is_null($in)) { - return 'NULL'; - } else { - return "'" . $this->escapeSimple($in) . "'"; - } - } - - // }}} - // {{{ fbsqlRaiseError() - - /** - * Produces a DB_Error object regarding the current problem - * - * @param int $errno if the error is being manually raised pass a - * DB_ERROR* constant here. If this isn't passed - * the error information gathered from the DBMS. - * - * @return object the DB_Error object - * - * @see DB_common::raiseError(), - * DB_fbsql::errorNative(), DB_common::errorCode() - */ - function fbsqlRaiseError($errno = null) - { - if ($errno === null) { - $errno = $this->errorCode(fbsql_errno($this->connection)); - } - return $this->raiseError($errno, null, null, null, - @fbsql_error($this->connection)); - } - - // }}} - // {{{ errorNative() - - /** - * Gets the DBMS' native error code produced by the last query - * - * @return int the DBMS' error code - */ - function errorNative() - { - return @fbsql_errno($this->connection); - } - - // }}} - // {{{ tableInfo() - - /** - * Returns information about a table or a result set - * - * @param object|string $result DB_result object from a query or a - * string containing the name of a table. - * While this also accepts a query result - * resource identifier, this behavior is - * deprecated. - * @param int $mode a valid tableInfo mode - * - * @return array an associative array with the information requested. - * A DB_Error object on failure. - * - * @see DB_common::tableInfo() - */ - function tableInfo($result, $mode = null) - { - if (is_string($result)) { - /* - * Probably received a table name. - * Create a result resource identifier. - */ - $id = @fbsql_list_fields($this->dsn['database'], - $result, $this->connection); - $got_string = true; - } elseif (isset($result->result)) { - /* - * Probably received a result object. - * Extract the result resource identifier. - */ - $id = $result->result; - $got_string = false; - } else { - /* - * Probably received a result resource identifier. - * Copy it. - * Deprecated. Here for compatibility only. - */ - $id = $result; - $got_string = false; - } - - if (!is_resource($id)) { - return $this->fbsqlRaiseError(DB_ERROR_NEED_MORE_DATA); - } - - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) { - $case_func = 'strtolower'; - } else { - $case_func = 'strval'; - } - - $count = @fbsql_num_fields($id); - $res = array(); - - if ($mode) { - $res['num_fields'] = $count; - } - - for ($i = 0; $i < $count; $i++) { - $res[$i] = array( - 'table' => $case_func(@fbsql_field_table($id, $i)), - 'name' => $case_func(@fbsql_field_name($id, $i)), - 'type' => @fbsql_field_type($id, $i), - 'len' => @fbsql_field_len($id, $i), - 'flags' => @fbsql_field_flags($id, $i), - ); - if ($mode & DB_TABLEINFO_ORDER) { - $res['order'][$res[$i]['name']] = $i; - } - if ($mode & DB_TABLEINFO_ORDERTABLE) { - $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i; - } - } - - // free the result only if we were called on a table - if ($got_string) { - @fbsql_free_result($id); - } - return $res; - } - - // }}} - // {{{ getSpecialQuery() - - /** - * Obtains the query string needed for listing a given type of objects - * - * @param string $type the kind of objects you want to retrieve - * - * @return string the SQL query string or null if the driver doesn't - * support the object type requested - * - * @access protected - * @see DB_common::getListOf() - */ - function getSpecialQuery($type) - { - switch ($type) { - case 'tables': - return 'SELECT "table_name" FROM information_schema.tables' - . ' t0, information_schema.schemata t1' - . ' WHERE t0.schema_pk=t1.schema_pk AND' - . ' "table_type" = \'BASE TABLE\'' - . ' AND "schema_name" = current_schema'; - case 'views': - return 'SELECT "table_name" FROM information_schema.tables' - . ' t0, information_schema.schemata t1' - . ' WHERE t0.schema_pk=t1.schema_pk AND' - . ' "table_type" = \'VIEW\'' - . ' AND "schema_name" = current_schema'; - case 'users': - return 'SELECT "user_name" from information_schema.users'; - case 'functions': - return 'SELECT "routine_name" FROM' - . ' information_schema.psm_routines' - . ' t0, information_schema.schemata t1' - . ' WHERE t0.schema_pk=t1.schema_pk' - . ' AND "routine_kind"=\'FUNCTION\'' - . ' AND "schema_name" = current_schema'; - case 'procedures': - return 'SELECT "routine_name" FROM' - . ' information_schema.psm_routines' - . ' t0, information_schema.schemata t1' - . ' WHERE t0.schema_pk=t1.schema_pk' - . ' AND "routine_kind"=\'PROCEDURE\'' - . ' AND "schema_name" = current_schema'; - default: - return null; - } - } - - // }}} -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ - -?> diff --git a/program/lib/DB/ibase.php b/program/lib/DB/ibase.php deleted file mode 100644 index 8b21a3c..0000000 --- a/program/lib/DB/ibase.php +++ /dev/null @@ -1,1071 +0,0 @@ - - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ibase.php 12 2005-10-02 11:36:35Z sparc $ - * @link http://pear.php.net/package/DB - */ - -/** - * Obtain the DB_common class so it can be extended from - */ -require_once 'DB/common.php'; - -/** - * The methods PEAR DB uses to interact with PHP's interbase extension - * for interacting with Interbase and Firebird databases - * - * These methods overload the ones declared in DB_common. - * - * While this class works with PHP 4, PHP's InterBase extension is - * unstable in PHP 4. Use PHP 5. - * - * NOTICE: limitQuery() only works for Firebird. - * - * @category Database - * @package DB - * @author Sterling Hughes - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - * @since Class became stable in Release 1.7.0 - */ -class DB_ibase extends DB_common -{ - // {{{ properties - - /** - * The DB driver type (mysql, oci8, odbc, etc.) - * @var string - */ - var $phptype = 'ibase'; - - /** - * The database syntax variant to be used (db2, access, etc.), if any - * @var string - */ - var $dbsyntax = 'ibase'; - - /** - * The capabilities of this DB implementation - * - * The 'new_link' element contains the PHP version that first provided - * new_link support for this DBMS. Contains false if it's unsupported. - * - * Meaning of the 'limit' element: - * + 'emulate' = emulate with fetch row by number - * + 'alter' = alter the query - * + false = skip rows - * - * NOTE: only firebird supports limit. - * - * @var array - */ - var $features = array( - 'limit' => false, - 'new_link' => false, - 'numrows' => 'emulate', - 'pconnect' => true, - 'prepare' => true, - 'ssl' => false, - 'transactions' => true, - ); - - /** - * A mapping of native error codes to DB error codes - * @var array - */ - var $errorcode_map = array( - -104 => DB_ERROR_SYNTAX, - -150 => DB_ERROR_ACCESS_VIOLATION, - -151 => DB_ERROR_ACCESS_VIOLATION, - -155 => DB_ERROR_NOSUCHTABLE, - -157 => DB_ERROR_NOSUCHFIELD, - -158 => DB_ERROR_VALUE_COUNT_ON_ROW, - -170 => DB_ERROR_MISMATCH, - -171 => DB_ERROR_MISMATCH, - -172 => DB_ERROR_INVALID, - // -204 => // Covers too many errors, need to use regex on msg - -205 => DB_ERROR_NOSUCHFIELD, - -206 => DB_ERROR_NOSUCHFIELD, - -208 => DB_ERROR_INVALID, - -219 => DB_ERROR_NOSUCHTABLE, - -297 => DB_ERROR_CONSTRAINT, - -303 => DB_ERROR_INVALID, - -413 => DB_ERROR_INVALID_NUMBER, - -530 => DB_ERROR_CONSTRAINT, - -551 => DB_ERROR_ACCESS_VIOLATION, - -552 => DB_ERROR_ACCESS_VIOLATION, - // -607 => // Covers too many errors, need to use regex on msg - -625 => DB_ERROR_CONSTRAINT_NOT_NULL, - -803 => DB_ERROR_CONSTRAINT, - -804 => DB_ERROR_VALUE_COUNT_ON_ROW, - -904 => DB_ERROR_CONNECT_FAILED, - -922 => DB_ERROR_NOSUCHDB, - -923 => DB_ERROR_CONNECT_FAILED, - -924 => DB_ERROR_CONNECT_FAILED - ); - - /** - * The raw database connection created by PHP - * @var resource - */ - var $connection; - - /** - * The DSN information for connecting to a database - * @var array - */ - var $dsn = array(); - - - /** - * The number of rows affected by a data manipulation query - * @var integer - * @access private - */ - var $affected = 0; - - /** - * Should data manipulation queries be committed automatically? - * @var bool - * @access private - */ - var $autocommit = true; - - /** - * The prepared statement handle from the most recently executed statement - * - * {@internal Mainly here because the InterBase/Firebird API is only - * able to retrieve data from result sets if the statemnt handle is - * still in scope.}} - * - * @var resource - */ - var $last_stmt; - - /** - * Is the given prepared statement a data manipulation query? - * @var array - * @access private - */ - var $manip_query = array(); - - - // }}} - // {{{ constructor - - /** - * This constructor calls $this->DB_common() - * - * @return void - */ - function DB_ibase() - { - $this->DB_common(); - } - - // }}} - // {{{ connect() - - /** - * Connect to the database server, log in and open the database - * - * Don't call this method directly. Use DB::connect() instead. - * - * PEAR DB's ibase driver supports the following extra DSN options: - * + buffers The number of database buffers to allocate for the - * server-side cache. - * + charset The default character set for a database. - * + dialect The default SQL dialect for any statement - * executed within a connection. Defaults to the - * highest one supported by client libraries. - * Functional only with InterBase 6 and up. - * + role Functional only with InterBase 5 and up. - * - * @param array $dsn the data source name - * @param bool $persistent should the connection be persistent? - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function connect($dsn, $persistent = false) - { - if (!PEAR::loadExtension('interbase')) { - return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND); - } - - $this->dsn = $dsn; - if ($dsn['dbsyntax']) { - $this->dbsyntax = $dsn['dbsyntax']; - } - if ($this->dbsyntax == 'firebird') { - $this->features['limit'] = 'alter'; - } - - $params = array( - $dsn['hostspec'] - ? ($dsn['hostspec'] . ':' . $dsn['database']) - : $dsn['database'], - $dsn['username'] ? $dsn['username'] : null, - $dsn['password'] ? $dsn['password'] : null, - isset($dsn['charset']) ? $dsn['charset'] : null, - isset($dsn['buffers']) ? $dsn['buffers'] : null, - isset($dsn['dialect']) ? $dsn['dialect'] : null, - isset($dsn['role']) ? $dsn['role'] : null, - ); - - $connect_function = $persistent ? 'ibase_pconnect' : 'ibase_connect'; - - $this->connection = @call_user_func_array($connect_function, $params); - if (!$this->connection) { - return $this->ibaseRaiseError(DB_ERROR_CONNECT_FAILED); - } - return DB_OK; - } - - // }}} - // {{{ disconnect() - - /** - * Disconnects from the database server - * - * @return bool TRUE on success, FALSE on failure - */ - function disconnect() - { - $ret = @ibase_close($this->connection); - $this->connection = null; - return $ret; - } - - // }}} - // {{{ simpleQuery() - - /** - * Sends a query to the database server - * - * @param string the SQL query string - * - * @return mixed + a PHP result resrouce for successful SELECT queries - * + the DB_OK constant for other successful queries - * + a DB_Error object on failure - */ - function simpleQuery($query) - { - $ismanip = DB::isManip($query); - $this->last_query = $query; - $query = $this->modifyQuery($query); - $result = @ibase_query($this->connection, $query); - - if (!$result) { - return $this->ibaseRaiseError(); - } - if ($this->autocommit && $ismanip) { - @ibase_commit($this->connection); - } - if ($ismanip) { - $this->affected = $result; - return DB_OK; - } else { - $this->affected = 0; - return $result; - } - } - - // }}} - // {{{ modifyLimitQuery() - - /** - * Adds LIMIT clauses to a query string according to current DBMS standards - * - * Only works with Firebird. - * - * @param string $query the query to modify - * @param int $from the row to start to fetching (0 = the first row) - * @param int $count the numbers of rows to fetch - * @param mixed $params array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 placeholder for non-array - * parameters or 1 placeholder per array element. - * - * @return string the query string with LIMIT clauses added - * - * @access protected - */ - function modifyLimitQuery($query, $from, $count, $params = array()) - { - if ($this->dsn['dbsyntax'] == 'firebird') { - $query = preg_replace('/^([\s(])*SELECT/i', - "SELECT FIRST $count SKIP $from", $query); - } - return $query; - } - - // }}} - // {{{ nextResult() - - /** - * Move the internal ibase result pointer to the next available result - * - * @param a valid fbsql result resource - * - * @access public - * - * @return true if a result is available otherwise return false - */ - function nextResult($result) - { - return false; - } - - // }}} - // {{{ fetchInto() - - /** - * Places a row from the result set into the given array - * - * Formating of the array and the data therein are configurable. - * See DB_result::fetchInto() for more information. - * - * This method is not meant to be called directly. Use - * DB_result::fetchInto() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result the query result resource - * @param array $arr the referenced array to put the data in - * @param int $fetchmode how the resulting array should be indexed - * @param int $rownum the row number to fetch (0 = first row) - * - * @return mixed DB_OK on success, NULL when the end of a result set is - * reached or on failure - * - * @see DB_result::fetchInto() - */ - function fetchInto($result, &$arr, $fetchmode, $rownum = null) - { - if ($rownum !== null) { - return $this->ibaseRaiseError(DB_ERROR_NOT_CAPABLE); - } - if ($fetchmode & DB_FETCHMODE_ASSOC) { - if (function_exists('ibase_fetch_assoc')) { - $arr = @ibase_fetch_assoc($result); - } else { - $arr = get_object_vars(ibase_fetch_object($result)); - } - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE && $arr) { - $arr = array_change_key_case($arr, CASE_LOWER); - } - } else { - $arr = @ibase_fetch_row($result); - } - if (!$arr) { - return null; - } - if ($this->options['portability'] & DB_PORTABILITY_RTRIM) { - $this->_rtrimArrayValues($arr); - } - if ($this->options['portability'] & DB_PORTABILITY_NULL_TO_EMPTY) { - $this->_convertNullArrayValuesToEmpty($arr); - } - return DB_OK; - } - - // }}} - // {{{ freeResult() - - /** - * Deletes the result set and frees the memory occupied by the result set - * - * This method is not meant to be called directly. Use - * DB_result::free() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return bool TRUE on success, FALSE if $result is invalid - * - * @see DB_result::free() - */ - function freeResult($result) - { - return @ibase_free_result($result); - } - - // }}} - // {{{ freeQuery() - - function freeQuery($query) - { - @ibase_free_query($query); - return true; - } - - // }}} - // {{{ affectedRows() - - /** - * Determines the number of rows affected by a data maniuplation query - * - * 0 is returned for queries that don't manipulate data. - * - * @return int the number of rows. A DB_Error object on failure. - */ - function affectedRows() - { - if (is_integer($this->affected)) { - return $this->affected; - } - return $this->ibaseRaiseError(DB_ERROR_NOT_CAPABLE); - } - - // }}} - // {{{ numCols() - - /** - * Gets the number of columns in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numCols() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of columns. A DB_Error object on failure. - * - * @see DB_result::numCols() - */ - function numCols($result) - { - $cols = @ibase_num_fields($result); - if (!$cols) { - return $this->ibaseRaiseError(); - } - return $cols; - } - - // }}} - // {{{ prepare() - - /** - * Prepares a query for multiple execution with execute(). - * - * prepare() requires a generic query as string like - * INSERT INTO numbers VALUES (?, ?, ?) - * . The ? characters are placeholders. - * - * Three types of placeholders can be used: - * + ? a quoted scalar value, i.e. strings, integers - * + ! value is inserted 'as is' - * + & requires a file name. The file's contents get - * inserted into the query (i.e. saving binary - * data in a db) - * - * Use backslashes to escape placeholder characters if you don't want - * them to be interpreted as placeholders. Example: - * "UPDATE foo SET col=? WHERE col='over \& under'" - * - * - * @param string $query query to be prepared - * @return mixed DB statement resource on success. DB_Error on failure. - */ - function prepare($query) - { - $tokens = preg_split('/((? $val) { - switch ($val) { - case '?': - $types[$token++] = DB_PARAM_SCALAR; - break; - case '&': - $types[$token++] = DB_PARAM_OPAQUE; - break; - case '!': - $types[$token++] = DB_PARAM_MISC; - break; - default: - $tokens[$key] = preg_replace('/\\\([&?!])/', "\\1", $val); - $newquery .= $tokens[$key] . '?'; - } - } - - $newquery = substr($newquery, 0, -1); - $this->last_query = $query; - $newquery = $this->modifyQuery($newquery); - $stmt = @ibase_prepare($this->connection, $newquery); - $this->prepare_types[(int)$stmt] = $types; - $this->manip_query[(int)$stmt] = DB::isManip($query); - return $stmt; - } - - // }}} - // {{{ execute() - - /** - * Executes a DB statement prepared with prepare(). - * - * @param resource $stmt a DB statement resource returned from prepare() - * @param mixed $data array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 for non-array items or the - * quantity of elements in the array. - * @return object a new DB_Result or a DB_Error when fail - * @see DB_ibase::prepare() - * @access public - */ - function &execute($stmt, $data = array()) - { - $data = (array)$data; - $this->last_parameters = $data; - - $types =& $this->prepare_types[(int)$stmt]; - if (count($types) != count($data)) { - $tmp =& $this->raiseError(DB_ERROR_MISMATCH); - return $tmp; - } - - $i = 0; - foreach ($data as $key => $value) { - if ($types[$i] == DB_PARAM_MISC) { - /* - * ibase doesn't seem to have the ability to pass a - * parameter along unchanged, so strip off quotes from start - * and end, plus turn two single quotes to one single quote, - * in order to avoid the quotes getting escaped by - * ibase and ending up in the database. - */ - $data[$key] = preg_replace("/^'(.*)'$/", "\\1", $data[$key]); - $data[$key] = str_replace("''", "'", $data[$key]); - } elseif ($types[$i] == DB_PARAM_OPAQUE) { - $fp = @fopen($data[$key], 'rb'); - if (!$fp) { - $tmp =& $this->raiseError(DB_ERROR_ACCESS_VIOLATION); - return $tmp; - } - $data[$key] = fread($fp, filesize($data[$key])); - fclose($fp); - } - $i++; - } - - array_unshift($data, $stmt); - - $res = call_user_func_array('ibase_execute', $data); - if (!$res) { - $tmp =& $this->ibaseRaiseError(); - return $tmp; - } - /* XXX need this? - if ($this->autocommit && $this->manip_query[(int)$stmt]) { - @ibase_commit($this->connection); - }*/ - $this->last_stmt = $stmt; - if ($this->manip_query[(int)$stmt]) { - $tmp = DB_OK; - } else { - $tmp =& new DB_result($this, $res); - } - return $tmp; - } - - /** - * Frees the internal resources associated with a prepared query - * - * @param resource $stmt the prepared statement's PHP resource - * @param bool $free_resource should the PHP resource be freed too? - * Use false if you need to get data - * from the result set later. - * - * @return bool TRUE on success, FALSE if $result is invalid - * - * @see DB_ibase::prepare() - */ - function freePrepared($stmt, $free_resource = true) - { - if (!is_resource($stmt)) { - return false; - } - if ($free_resource) { - @ibase_free_query($stmt); - } - unset($this->prepare_tokens[(int)$stmt]); - unset($this->prepare_types[(int)$stmt]); - unset($this->manip_query[(int)$stmt]); - return true; - } - - // }}} - // {{{ autoCommit() - - /** - * Enables or disables automatic commits - * - * @param bool $onoff true turns it on, false turns it off - * - * @return int DB_OK on success. A DB_Error object if the driver - * doesn't support auto-committing transactions. - */ - function autoCommit($onoff = false) - { - $this->autocommit = $onoff ? 1 : 0; - return DB_OK; - } - - // }}} - // {{{ commit() - - /** - * Commits the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function commit() - { - return @ibase_commit($this->connection); - } - - // }}} - // {{{ rollback() - - /** - * Reverts the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function rollback() - { - return @ibase_rollback($this->connection); - } - - // }}} - // {{{ transactionInit() - - function transactionInit($trans_args = 0) - { - return $trans_args - ? @ibase_trans($trans_args, $this->connection) - : @ibase_trans(); - } - - // }}} - // {{{ nextId() - - /** - * Returns the next free id in a sequence - * - * @param string $seq_name name of the sequence - * @param boolean $ondemand when true, the seqence is automatically - * created if it does not exist - * - * @return int the next id number in the sequence. - * A DB_Error object on failure. - * - * @see DB_common::nextID(), DB_common::getSequenceName(), - * DB_ibase::createSequence(), DB_ibase::dropSequence() - */ - function nextId($seq_name, $ondemand = true) - { - $sqn = strtoupper($this->getSequenceName($seq_name)); - $repeat = 0; - do { - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $result =& $this->query("SELECT GEN_ID(${sqn}, 1) " - . 'FROM RDB$GENERATORS ' - . "WHERE RDB\$GENERATOR_NAME='${sqn}'"); - $this->popErrorHandling(); - if ($ondemand && DB::isError($result)) { - $repeat = 1; - $result = $this->createSequence($seq_name); - if (DB::isError($result)) { - return $result; - } - } else { - $repeat = 0; - } - } while ($repeat); - if (DB::isError($result)) { - return $this->raiseError($result); - } - $arr = $result->fetchRow(DB_FETCHMODE_ORDERED); - $result->free(); - return $arr[0]; - } - - // }}} - // {{{ createSequence() - - /** - * Creates a new sequence - * - * @param string $seq_name name of the new sequence - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::createSequence(), DB_common::getSequenceName(), - * DB_ibase::nextID(), DB_ibase::dropSequence() - */ - function createSequence($seq_name) - { - $sqn = strtoupper($this->getSequenceName($seq_name)); - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $result = $this->query("CREATE GENERATOR ${sqn}"); - $this->popErrorHandling(); - - return $result; - } - - // }}} - // {{{ dropSequence() - - /** - * Deletes a sequence - * - * @param string $seq_name name of the sequence to be deleted - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::dropSequence(), DB_common::getSequenceName(), - * DB_ibase::nextID(), DB_ibase::createSequence() - */ - function dropSequence($seq_name) - { - return $this->query('DELETE FROM RDB$GENERATORS ' - . "WHERE RDB\$GENERATOR_NAME='" - . strtoupper($this->getSequenceName($seq_name)) - . "'"); - } - - // }}} - // {{{ _ibaseFieldFlags() - - /** - * Get the column's flags - * - * Supports "primary_key", "unique_key", "not_null", "default", - * "computed" and "blob". - * - * @param string $field_name the name of the field - * @param string $table_name the name of the table - * - * @return string the flags - * - * @access private - */ - function _ibaseFieldFlags($field_name, $table_name) - { - $sql = 'SELECT R.RDB$CONSTRAINT_TYPE CTYPE' - .' FROM RDB$INDEX_SEGMENTS I' - .' JOIN RDB$RELATION_CONSTRAINTS R ON I.RDB$INDEX_NAME=R.RDB$INDEX_NAME' - .' WHERE I.RDB$FIELD_NAME=\'' . $field_name . '\'' - .' AND UPPER(R.RDB$RELATION_NAME)=\'' . strtoupper($table_name) . '\''; - - $result = @ibase_query($this->connection, $sql); - if (!$result) { - return $this->ibaseRaiseError(); - } - - $flags = ''; - if ($obj = @ibase_fetch_object($result)) { - @ibase_free_result($result); - if (isset($obj->CTYPE) && trim($obj->CTYPE) == 'PRIMARY KEY') { - $flags .= 'primary_key '; - } - if (isset($obj->CTYPE) && trim($obj->CTYPE) == 'UNIQUE') { - $flags .= 'unique_key '; - } - } - - $sql = 'SELECT R.RDB$NULL_FLAG AS NFLAG,' - .' R.RDB$DEFAULT_SOURCE AS DSOURCE,' - .' F.RDB$FIELD_TYPE AS FTYPE,' - .' F.RDB$COMPUTED_SOURCE AS CSOURCE' - .' FROM RDB$RELATION_FIELDS R ' - .' JOIN RDB$FIELDS F ON R.RDB$FIELD_SOURCE=F.RDB$FIELD_NAME' - .' WHERE UPPER(R.RDB$RELATION_NAME)=\'' . strtoupper($table_name) . '\'' - .' AND R.RDB$FIELD_NAME=\'' . $field_name . '\''; - - $result = @ibase_query($this->connection, $sql); - if (!$result) { - return $this->ibaseRaiseError(); - } - if ($obj = @ibase_fetch_object($result)) { - @ibase_free_result($result); - if (isset($obj->NFLAG)) { - $flags .= 'not_null '; - } - if (isset($obj->DSOURCE)) { - $flags .= 'default '; - } - if (isset($obj->CSOURCE)) { - $flags .= 'computed '; - } - if (isset($obj->FTYPE) && $obj->FTYPE == 261) { - $flags .= 'blob '; - } - } - - return trim($flags); - } - - // }}} - // {{{ ibaseRaiseError() - - /** - * Produces a DB_Error object regarding the current problem - * - * @param int $errno if the error is being manually raised pass a - * DB_ERROR* constant here. If this isn't passed - * the error information gathered from the DBMS. - * - * @return object the DB_Error object - * - * @see DB_common::raiseError(), - * DB_ibase::errorNative(), DB_ibase::errorCode() - */ - function &ibaseRaiseError($errno = null) - { - if ($errno === null) { - $errno = $this->errorCode($this->errorNative()); - } - $tmp =& $this->raiseError($errno, null, null, null, @ibase_errmsg()); - return $tmp; - } - - // }}} - // {{{ errorNative() - - /** - * Gets the DBMS' native error code produced by the last query - * - * @return int the DBMS' error code. NULL if there is no error code. - * - * @since Method available since Release 1.7.0 - */ - function errorNative() - { - if (function_exists('ibase_errcode')) { - return @ibase_errcode(); - } - if (preg_match('/^Dynamic SQL Error SQL error code = ([0-9-]+)/i', - @ibase_errmsg(), $m)) { - return (int)$m[1]; - } - return null; - } - - // }}} - // {{{ errorCode() - - /** - * Maps native error codes to DB's portable ones - * - * @param int $nativecode the error code returned by the DBMS - * - * @return int the portable DB error code. Return DB_ERROR if the - * current driver doesn't have a mapping for the - * $nativecode submitted. - * - * @since Method available since Release 1.7.0 - */ - function errorCode($nativecode = null) - { - if (isset($this->errorcode_map[$nativecode])) { - return $this->errorcode_map[$nativecode]; - } - - static $error_regexps; - if (!isset($error_regexps)) { - $error_regexps = array( - '/generator .* is not defined/' - => DB_ERROR_SYNTAX, // for compat. w ibase_errcode() - '/table.*(not exist|not found|unknown)/i' - => DB_ERROR_NOSUCHTABLE, - '/table .* already exists/i' - => DB_ERROR_ALREADY_EXISTS, - '/unsuccessful metadata update .* failed attempt to store duplicate value/i' - => DB_ERROR_ALREADY_EXISTS, - '/unsuccessful metadata update .* not found/i' - => DB_ERROR_NOT_FOUND, - '/validation error for column .* value "\*\*\* null/i' - => DB_ERROR_CONSTRAINT_NOT_NULL, - '/violation of [\w ]+ constraint/i' - => DB_ERROR_CONSTRAINT, - '/conversion error from string/i' - => DB_ERROR_INVALID_NUMBER, - '/no permission for/i' - => DB_ERROR_ACCESS_VIOLATION, - '/arithmetic exception, numeric overflow, or string truncation/i' - => DB_ERROR_INVALID, - ); - } - - $errormsg = @ibase_errmsg(); - foreach ($error_regexps as $regexp => $code) { - if (preg_match($regexp, $errormsg)) { - return $code; - } - } - return DB_ERROR; - } - - // }}} - // {{{ tableInfo() - - /** - * Returns information about a table or a result set - * - * NOTE: only supports 'table' and 'flags' if $result - * is a table name. - * - * @param object|string $result DB_result object from a query or a - * string containing the name of a table. - * While this also accepts a query result - * resource identifier, this behavior is - * deprecated. - * @param int $mode a valid tableInfo mode - * - * @return array an associative array with the information requested. - * A DB_Error object on failure. - * - * @see DB_common::tableInfo() - */ - function tableInfo($result, $mode = null) - { - if (is_string($result)) { - /* - * Probably received a table name. - * Create a result resource identifier. - */ - $id = @ibase_query($this->connection, - "SELECT * FROM $result WHERE 1=0"); - $got_string = true; - } elseif (isset($result->result)) { - /* - * Probably received a result object. - * Extract the result resource identifier. - */ - $id = $result->result; - $got_string = false; - } else { - /* - * Probably received a result resource identifier. - * Copy it. - * Deprecated. Here for compatibility only. - */ - $id = $result; - $got_string = false; - } - - if (!is_resource($id)) { - return $this->ibaseRaiseError(DB_ERROR_NEED_MORE_DATA); - } - - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) { - $case_func = 'strtolower'; - } else { - $case_func = 'strval'; - } - - $count = @ibase_num_fields($id); - $res = array(); - - if ($mode) { - $res['num_fields'] = $count; - } - - for ($i = 0; $i < $count; $i++) { - $info = @ibase_field_info($id, $i); - $res[$i] = array( - 'table' => $got_string ? $case_func($result) : '', - 'name' => $case_func($info['name']), - 'type' => $info['type'], - 'len' => $info['length'], - 'flags' => ($got_string) - ? $this->_ibaseFieldFlags($info['name'], $result) - : '', - ); - if ($mode & DB_TABLEINFO_ORDER) { - $res['order'][$res[$i]['name']] = $i; - } - if ($mode & DB_TABLEINFO_ORDERTABLE) { - $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i; - } - } - - // free the result only if we were called on a table - if ($got_string) { - @ibase_free_result($id); - } - return $res; - } - - // }}} - // {{{ getSpecialQuery() - - /** - * Obtains the query string needed for listing a given type of objects - * - * @param string $type the kind of objects you want to retrieve - * - * @return string the SQL query string or null if the driver doesn't - * support the object type requested - * - * @access protected - * @see DB_common::getListOf() - */ - function getSpecialQuery($type) - { - switch ($type) { - case 'tables': - return 'SELECT DISTINCT R.RDB$RELATION_NAME FROM ' - . 'RDB$RELATION_FIELDS R WHERE R.RDB$SYSTEM_FLAG=0'; - case 'views': - return 'SELECT DISTINCT RDB$VIEW_NAME from RDB$VIEW_RELATIONS'; - case 'users': - return 'SELECT DISTINCT RDB$USER FROM RDB$USER_PRIVILEGES'; - default: - return null; - } - } - - // }}} - -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ - -?> diff --git a/program/lib/DB/ifx.php b/program/lib/DB/ifx.php deleted file mode 100644 index aa6747d..0000000 --- a/program/lib/DB/ifx.php +++ /dev/null @@ -1,681 +0,0 @@ - - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ifx.php 12 2005-10-02 11:36:35Z sparc $ - * @link http://pear.php.net/package/DB - */ - -/** - * Obtain the DB_common class so it can be extended from - */ -require_once 'DB/common.php'; - -/** - * The methods PEAR DB uses to interact with PHP's ifx extension - * for interacting with Informix databases - * - * These methods overload the ones declared in DB_common. - * - * More info on Informix errors can be found at: - * http://www.informix.com/answers/english/ierrors.htm - * - * TODO: - * - set needed env Informix vars on connect - * - implement native prepare/execute - * - * @category Database - * @package DB - * @author Tomas V.V.Cox - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - */ -class DB_ifx extends DB_common -{ - // {{{ properties - - /** - * The DB driver type (mysql, oci8, odbc, etc.) - * @var string - */ - var $phptype = 'ifx'; - - /** - * The database syntax variant to be used (db2, access, etc.), if any - * @var string - */ - var $dbsyntax = 'ifx'; - - /** - * The capabilities of this DB implementation - * - * The 'new_link' element contains the PHP version that first provided - * new_link support for this DBMS. Contains false if it's unsupported. - * - * Meaning of the 'limit' element: - * + 'emulate' = emulate with fetch row by number - * + 'alter' = alter the query - * + false = skip rows - * - * @var array - */ - var $features = array( - 'limit' => 'emulate', - 'new_link' => false, - 'numrows' => 'emulate', - 'pconnect' => true, - 'prepare' => false, - 'ssl' => false, - 'transactions' => true, - ); - - /** - * A mapping of native error codes to DB error codes - * @var array - */ - var $errorcode_map = array( - '-201' => DB_ERROR_SYNTAX, - '-206' => DB_ERROR_NOSUCHTABLE, - '-217' => DB_ERROR_NOSUCHFIELD, - '-236' => DB_ERROR_VALUE_COUNT_ON_ROW, - '-239' => DB_ERROR_CONSTRAINT, - '-253' => DB_ERROR_SYNTAX, - '-292' => DB_ERROR_CONSTRAINT_NOT_NULL, - '-310' => DB_ERROR_ALREADY_EXISTS, - '-316' => DB_ERROR_ALREADY_EXISTS, - '-319' => DB_ERROR_NOT_FOUND, - '-329' => DB_ERROR_NODBSELECTED, - '-346' => DB_ERROR_CONSTRAINT, - '-386' => DB_ERROR_CONSTRAINT_NOT_NULL, - '-391' => DB_ERROR_CONSTRAINT_NOT_NULL, - '-554' => DB_ERROR_SYNTAX, - '-691' => DB_ERROR_CONSTRAINT, - '-692' => DB_ERROR_CONSTRAINT, - '-703' => DB_ERROR_CONSTRAINT_NOT_NULL, - '-1204' => DB_ERROR_INVALID_DATE, - '-1205' => DB_ERROR_INVALID_DATE, - '-1206' => DB_ERROR_INVALID_DATE, - '-1209' => DB_ERROR_INVALID_DATE, - '-1210' => DB_ERROR_INVALID_DATE, - '-1212' => DB_ERROR_INVALID_DATE, - '-1213' => DB_ERROR_INVALID_NUMBER, - ); - - /** - * The raw database connection created by PHP - * @var resource - */ - var $connection; - - /** - * The DSN information for connecting to a database - * @var array - */ - var $dsn = array(); - - - /** - * Should data manipulation queries be committed automatically? - * @var bool - * @access private - */ - var $autocommit = true; - - /** - * The quantity of transactions begun - * - * {@internal While this is private, it can't actually be designated - * private in PHP 5 because it is directly accessed in the test suite.}} - * - * @var integer - * @access private - */ - var $transaction_opcount = 0; - - /** - * The number of rows affected by a data manipulation query - * @var integer - * @access private - */ - var $affected = 0; - - - // }}} - // {{{ constructor - - /** - * This constructor calls $this->DB_common() - * - * @return void - */ - function DB_ifx() - { - $this->DB_common(); - } - - // }}} - // {{{ connect() - - /** - * Connect to the database server, log in and open the database - * - * Don't call this method directly. Use DB::connect() instead. - * - * @param array $dsn the data source name - * @param bool $persistent should the connection be persistent? - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function connect($dsn, $persistent = false) - { - if (!PEAR::loadExtension('informix') && - !PEAR::loadExtension('Informix')) - { - return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND); - } - - $this->dsn = $dsn; - if ($dsn['dbsyntax']) { - $this->dbsyntax = $dsn['dbsyntax']; - } - - $dbhost = $dsn['hostspec'] ? '@' . $dsn['hostspec'] : ''; - $dbname = $dsn['database'] ? $dsn['database'] . $dbhost : ''; - $user = $dsn['username'] ? $dsn['username'] : ''; - $pw = $dsn['password'] ? $dsn['password'] : ''; - - $connect_function = $persistent ? 'ifx_pconnect' : 'ifx_connect'; - - $this->connection = @$connect_function($dbname, $user, $pw); - if (!is_resource($this->connection)) { - return $this->ifxRaiseError(DB_ERROR_CONNECT_FAILED); - } - return DB_OK; - } - - // }}} - // {{{ disconnect() - - /** - * Disconnects from the database server - * - * @return bool TRUE on success, FALSE on failure - */ - function disconnect() - { - $ret = @ifx_close($this->connection); - $this->connection = null; - return $ret; - } - - // }}} - // {{{ simpleQuery() - - /** - * Sends a query to the database server - * - * @param string the SQL query string - * - * @return mixed + a PHP result resrouce for successful SELECT queries - * + the DB_OK constant for other successful queries - * + a DB_Error object on failure - */ - function simpleQuery($query) - { - $ismanip = DB::isManip($query); - $this->last_query = $query; - $this->affected = null; - if (preg_match('/(SELECT)/i', $query)) { //TESTME: Use !DB::isManip()? - // the scroll is needed for fetching absolute row numbers - // in a select query result - $result = @ifx_query($query, $this->connection, IFX_SCROLL); - } else { - if (!$this->autocommit && $ismanip) { - if ($this->transaction_opcount == 0) { - $result = @ifx_query('BEGIN WORK', $this->connection); - if (!$result) { - return $this->ifxRaiseError(); - } - } - $this->transaction_opcount++; - } - $result = @ifx_query($query, $this->connection); - } - if (!$result) { - return $this->ifxRaiseError(); - } - $this->affected = @ifx_affected_rows($result); - // Determine which queries should return data, and which - // should return an error code only. - if (preg_match('/(SELECT)/i', $query)) { - return $result; - } - // XXX Testme: free results inside a transaction - // may cause to stop it and commit the work? - - // Result has to be freed even with a insert or update - @ifx_free_result($result); - - return DB_OK; - } - - // }}} - // {{{ nextResult() - - /** - * Move the internal ifx result pointer to the next available result - * - * @param a valid fbsql result resource - * - * @access public - * - * @return true if a result is available otherwise return false - */ - function nextResult($result) - { - return false; - } - - // }}} - // {{{ affectedRows() - - /** - * Determines the number of rows affected by a data maniuplation query - * - * 0 is returned for queries that don't manipulate data. - * - * @return int the number of rows. A DB_Error object on failure. - */ - function affectedRows() - { - if (DB::isManip($this->last_query)) { - return $this->affected; - } else { - return 0; - } - } - - // }}} - // {{{ fetchInto() - - /** - * Places a row from the result set into the given array - * - * Formating of the array and the data therein are configurable. - * See DB_result::fetchInto() for more information. - * - * This method is not meant to be called directly. Use - * DB_result::fetchInto() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result the query result resource - * @param array $arr the referenced array to put the data in - * @param int $fetchmode how the resulting array should be indexed - * @param int $rownum the row number to fetch (0 = first row) - * - * @return mixed DB_OK on success, NULL when the end of a result set is - * reached or on failure - * - * @see DB_result::fetchInto() - */ - function fetchInto($result, &$arr, $fetchmode, $rownum = null) - { - if (($rownum !== null) && ($rownum < 0)) { - return null; - } - if ($rownum === null) { - /* - * Even though fetch_row() should return the next row if - * $rownum is null, it doesn't in all cases. Bug 598. - */ - $rownum = 'NEXT'; - } else { - // Index starts at row 1, unlike most DBMS's starting at 0. - $rownum++; - } - if (!$arr = @ifx_fetch_row($result, $rownum)) { - return null; - } - if ($fetchmode !== DB_FETCHMODE_ASSOC) { - $i=0; - $order = array(); - foreach ($arr as $val) { - $order[$i++] = $val; - } - $arr = $order; - } elseif ($fetchmode == DB_FETCHMODE_ASSOC && - $this->options['portability'] & DB_PORTABILITY_LOWERCASE) - { - $arr = array_change_key_case($arr, CASE_LOWER); - } - if ($this->options['portability'] & DB_PORTABILITY_RTRIM) { - $this->_rtrimArrayValues($arr); - } - if ($this->options['portability'] & DB_PORTABILITY_NULL_TO_EMPTY) { - $this->_convertNullArrayValuesToEmpty($arr); - } - return DB_OK; - } - - // }}} - // {{{ numCols() - - /** - * Gets the number of columns in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numCols() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of columns. A DB_Error object on failure. - * - * @see DB_result::numCols() - */ - function numCols($result) - { - if (!$cols = @ifx_num_fields($result)) { - return $this->ifxRaiseError(); - } - return $cols; - } - - // }}} - // {{{ freeResult() - - /** - * Deletes the result set and frees the memory occupied by the result set - * - * This method is not meant to be called directly. Use - * DB_result::free() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return bool TRUE on success, FALSE if $result is invalid - * - * @see DB_result::free() - */ - function freeResult($result) - { - return @ifx_free_result($result); - } - - // }}} - // {{{ autoCommit() - - /** - * Enables or disables automatic commits - * - * @param bool $onoff true turns it on, false turns it off - * - * @return int DB_OK on success. A DB_Error object if the driver - * doesn't support auto-committing transactions. - */ - function autoCommit($onoff = true) - { - // XXX if $this->transaction_opcount > 0, we should probably - // issue a warning here. - $this->autocommit = $onoff ? true : false; - return DB_OK; - } - - // }}} - // {{{ commit() - - /** - * Commits the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function commit() - { - if ($this->transaction_opcount > 0) { - $result = @ifx_query('COMMIT WORK', $this->connection); - $this->transaction_opcount = 0; - if (!$result) { - return $this->ifxRaiseError(); - } - } - return DB_OK; - } - - // }}} - // {{{ rollback() - - /** - * Reverts the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function rollback() - { - if ($this->transaction_opcount > 0) { - $result = @ifx_query('ROLLBACK WORK', $this->connection); - $this->transaction_opcount = 0; - if (!$result) { - return $this->ifxRaiseError(); - } - } - return DB_OK; - } - - // }}} - // {{{ ifxRaiseError() - - /** - * Produces a DB_Error object regarding the current problem - * - * @param int $errno if the error is being manually raised pass a - * DB_ERROR* constant here. If this isn't passed - * the error information gathered from the DBMS. - * - * @return object the DB_Error object - * - * @see DB_common::raiseError(), - * DB_ifx::errorNative(), DB_ifx::errorCode() - */ - function ifxRaiseError($errno = null) - { - if ($errno === null) { - $errno = $this->errorCode(ifx_error()); - } - return $this->raiseError($errno, null, null, null, - $this->errorNative()); - } - - // }}} - // {{{ errorNative() - - /** - * Gets the DBMS' native error code and message produced by the last query - * - * @return string the DBMS' error code and message - */ - function errorNative() - { - return @ifx_error() . ' ' . @ifx_errormsg(); - } - - // }}} - // {{{ errorCode() - - /** - * Maps native error codes to DB's portable ones. - * - * Requires that the DB implementation's constructor fills - * in the $errorcode_map property. - * - * @param string $nativecode error code returned by the database - * @return int a portable DB error code, or DB_ERROR if this DB - * implementation has no mapping for the given error code. - */ - function errorCode($nativecode) - { - if (ereg('SQLCODE=(.*)]', $nativecode, $match)) { - $code = $match[1]; - if (isset($this->errorcode_map[$code])) { - return $this->errorcode_map[$code]; - } - } - return DB_ERROR; - } - - // }}} - // {{{ tableInfo() - - /** - * Returns information about a table or a result set - * - * NOTE: only supports 'table' if $result is a table name. - * - * If analyzing a query result and the result has duplicate field names, - * an error will be raised saying - * can't distinguish duplicate field names. - * - * @param object|string $result DB_result object from a query or a - * string containing the name of a table. - * While this also accepts a query result - * resource identifier, this behavior is - * deprecated. - * @param int $mode a valid tableInfo mode - * - * @return array an associative array with the information requested. - * A DB_Error object on failure. - * - * @see DB_common::tableInfo() - * @since Method available since Release 1.6.0 - */ - function tableInfo($result, $mode = null) - { - if (is_string($result)) { - /* - * Probably received a table name. - * Create a result resource identifier. - */ - $id = @ifx_query("SELECT * FROM $result WHERE 1=0", - $this->connection); - $got_string = true; - } elseif (isset($result->result)) { - /* - * Probably received a result object. - * Extract the result resource identifier. - */ - $id = $result->result; - $got_string = false; - } else { - /* - * Probably received a result resource identifier. - * Copy it. - */ - $id = $result; - $got_string = false; - } - - if (!is_resource($id)) { - return $this->ifxRaiseError(DB_ERROR_NEED_MORE_DATA); - } - - $flds = @ifx_fieldproperties($id); - $count = @ifx_num_fields($id); - - if (count($flds) != $count) { - return $this->raiseError("can't distinguish duplicate field names"); - } - - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) { - $case_func = 'strtolower'; - } else { - $case_func = 'strval'; - } - - $i = 0; - $res = array(); - - if ($mode) { - $res['num_fields'] = $count; - } - - foreach ($flds as $key => $value) { - $props = explode(';', $value); - $res[$i] = array( - 'table' => $got_string ? $case_func($result) : '', - 'name' => $case_func($key), - 'type' => $props[0], - 'len' => $props[1], - 'flags' => $props[4] == 'N' ? 'not_null' : '', - ); - if ($mode & DB_TABLEINFO_ORDER) { - $res['order'][$res[$i]['name']] = $i; - } - if ($mode & DB_TABLEINFO_ORDERTABLE) { - $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i; - } - $i++; - } - - // free the result only if we were called on a table - if ($got_string) { - @ifx_free_result($id); - } - return $res; - } - - // }}} - // {{{ getSpecialQuery() - - /** - * Obtains the query string needed for listing a given type of objects - * - * @param string $type the kind of objects you want to retrieve - * - * @return string the SQL query string or null if the driver doesn't - * support the object type requested - * - * @access protected - * @see DB_common::getListOf() - */ - function getSpecialQuery($type) - { - switch ($type) { - case 'tables': - return 'SELECT tabname FROM systables WHERE tabid >= 100'; - default: - return null; - } - } - - // }}} - -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ - -?> diff --git a/program/lib/DB/msql.php b/program/lib/DB/msql.php deleted file mode 100644 index 76cd4e9..0000000 --- a/program/lib/DB/msql.php +++ /dev/null @@ -1,810 +0,0 @@ - - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: msql.php 12 2005-10-02 11:36:35Z sparc $ - * @link http://pear.php.net/package/DB - */ - -/** - * Obtain the DB_common class so it can be extended from - */ -require_once 'DB/common.php'; - -/** - * The methods PEAR DB uses to interact with PHP's msql extension - * for interacting with Mini SQL databases - * - * These methods overload the ones declared in DB_common. - * - * PHP's mSQL extension did weird things with NULL values prior to PHP - * 4.3.11 and 5.0.4. Make sure your version of PHP meets or exceeds - * those versions. - * - * @category Database - * @package DB - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - * @since Class not functional until Release 1.7.0 - */ -class DB_msql extends DB_common -{ - // {{{ properties - - /** - * The DB driver type (mysql, oci8, odbc, etc.) - * @var string - */ - var $phptype = 'msql'; - - /** - * The database syntax variant to be used (db2, access, etc.), if any - * @var string - */ - var $dbsyntax = 'msql'; - - /** - * The capabilities of this DB implementation - * - * The 'new_link' element contains the PHP version that first provided - * new_link support for this DBMS. Contains false if it's unsupported. - * - * Meaning of the 'limit' element: - * + 'emulate' = emulate with fetch row by number - * + 'alter' = alter the query - * + false = skip rows - * - * @var array - */ - var $features = array( - 'limit' => 'emulate', - 'new_link' => false, - 'numrows' => true, - 'pconnect' => true, - 'prepare' => false, - 'ssl' => false, - 'transactions' => false, - ); - - /** - * A mapping of native error codes to DB error codes - * @var array - */ - var $errorcode_map = array( - ); - - /** - * The raw database connection created by PHP - * @var resource - */ - var $connection; - - /** - * The DSN information for connecting to a database - * @var array - */ - var $dsn = array(); - - - /** - * The query result resource created by PHP - * - * Used to make affectedRows() work. Only contains the result for - * data manipulation queries. Contains false for other queries. - * - * @var resource - * @access private - */ - var $_result; - - - // }}} - // {{{ constructor - - /** - * This constructor calls $this->DB_common() - * - * @return void - */ - function DB_msql() - { - $this->DB_common(); - } - - // }}} - // {{{ connect() - - /** - * Connect to the database server, log in and open the database - * - * Don't call this method directly. Use DB::connect() instead. - * - * Example of how to connect: - * - * require_once 'DB.php'; - * - * // $dsn = 'msql://hostname/dbname'; // use a TCP connection - * $dsn = 'msql:///dbname'; // use a socket - * $options = array( - * 'portability' => DB_PORTABILITY_ALL, - * ); - * - * $db =& DB::connect($dsn, $options); - * if (PEAR::isError($db)) { - * die($db->getMessage()); - * } - * - * - * @param array $dsn the data source name - * @param bool $persistent should the connection be persistent? - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function connect($dsn, $persistent = false) - { - if (!PEAR::loadExtension('msql')) { - return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND); - } - - $this->dsn = $dsn; - if ($dsn['dbsyntax']) { - $this->dbsyntax = $dsn['dbsyntax']; - } - - $params = array(); - if ($dsn['hostspec']) { - $params[] = $dsn['port'] - ? $dsn['hostspec'] . ',' . $dsn['port'] - : $dsn['hostspec']; - } - - $connect_function = $persistent ? 'msql_pconnect' : 'msql_connect'; - - $ini = ini_get('track_errors'); - $php_errormsg = ''; - if ($ini) { - $this->connection = @call_user_func_array($connect_function, - $params); - } else { - ini_set('track_errors', 1); - $this->connection = @call_user_func_array($connect_function, - $params); - ini_set('track_errors', $ini); - } - - if (!$this->connection) { - if (($err = @msql_error()) != '') { - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - $err); - } else { - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - $php_errormsg); - } - } - - if (!@msql_select_db($dsn['database'], $this->connection)) { - return $this->msqlRaiseError(); - } - return DB_OK; - } - - // }}} - // {{{ disconnect() - - /** - * Disconnects from the database server - * - * @return bool TRUE on success, FALSE on failure - */ - function disconnect() - { - $ret = @msql_close($this->connection); - $this->connection = null; - return $ret; - } - - // }}} - // {{{ simpleQuery() - - /** - * Sends a query to the database server - * - * @param string the SQL query string - * - * @return mixed + a PHP result resrouce for successful SELECT queries - * + the DB_OK constant for other successful queries - * + a DB_Error object on failure - */ - function simpleQuery($query) - { - $this->last_query = $query; - $query = $this->modifyQuery($query); - $result = @msql_query($query, $this->connection); - if (!$result) { - return $this->msqlRaiseError(); - } - // Determine which queries that should return data, and which - // should return an error code only. - if (DB::isManip($query)) { - $this->_result = $result; - return DB_OK; - } else { - $this->_result = false; - return $result; - } - } - - - // }}} - // {{{ nextResult() - - /** - * Move the internal msql result pointer to the next available result - * - * @param a valid fbsql result resource - * - * @access public - * - * @return true if a result is available otherwise return false - */ - function nextResult($result) - { - return false; - } - - // }}} - // {{{ fetchInto() - - /** - * Places a row from the result set into the given array - * - * Formating of the array and the data therein are configurable. - * See DB_result::fetchInto() for more information. - * - * This method is not meant to be called directly. Use - * DB_result::fetchInto() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * PHP's mSQL extension did weird things with NULL values prior to PHP - * 4.3.11 and 5.0.4. Make sure your version of PHP meets or exceeds - * those versions. - * - * @param resource $result the query result resource - * @param array $arr the referenced array to put the data in - * @param int $fetchmode how the resulting array should be indexed - * @param int $rownum the row number to fetch (0 = first row) - * - * @return mixed DB_OK on success, NULL when the end of a result set is - * reached or on failure - * - * @see DB_result::fetchInto() - */ - function fetchInto($result, &$arr, $fetchmode, $rownum = null) - { - if ($rownum !== null) { - if (!@msql_data_seek($result, $rownum)) { - return null; - } - } - if ($fetchmode & DB_FETCHMODE_ASSOC) { - $arr = @msql_fetch_array($result, MSQL_ASSOC); - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE && $arr) { - $arr = array_change_key_case($arr, CASE_LOWER); - } - } else { - $arr = @msql_fetch_row($result); - } - if (!$arr) { - return null; - } - if ($this->options['portability'] & DB_PORTABILITY_RTRIM) { - $this->_rtrimArrayValues($arr); - } - if ($this->options['portability'] & DB_PORTABILITY_NULL_TO_EMPTY) { - $this->_convertNullArrayValuesToEmpty($arr); - } - return DB_OK; - } - - // }}} - // {{{ freeResult() - - /** - * Deletes the result set and frees the memory occupied by the result set - * - * This method is not meant to be called directly. Use - * DB_result::free() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return bool TRUE on success, FALSE if $result is invalid - * - * @see DB_result::free() - */ - function freeResult($result) - { - return @msql_free_result($result); - } - - // }}} - // {{{ numCols() - - /** - * Gets the number of columns in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numCols() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of columns. A DB_Error object on failure. - * - * @see DB_result::numCols() - */ - function numCols($result) - { - $cols = @msql_num_fields($result); - if (!$cols) { - return $this->msqlRaiseError(); - } - return $cols; - } - - // }}} - // {{{ numRows() - - /** - * Gets the number of rows in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numRows() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of rows. A DB_Error object on failure. - * - * @see DB_result::numRows() - */ - function numRows($result) - { - $rows = @msql_num_rows($result); - if ($rows === false) { - return $this->msqlRaiseError(); - } - return $rows; - } - - // }}} - // {{{ affected() - - /** - * Determines the number of rows affected by a data maniuplation query - * - * 0 is returned for queries that don't manipulate data. - * - * @return int the number of rows. A DB_Error object on failure. - */ - function affectedRows() - { - if (!$this->_result) { - return 0; - } - return msql_affected_rows($this->_result); - } - - // }}} - // {{{ nextId() - - /** - * Returns the next free id in a sequence - * - * @param string $seq_name name of the sequence - * @param boolean $ondemand when true, the seqence is automatically - * created if it does not exist - * - * @return int the next id number in the sequence. - * A DB_Error object on failure. - * - * @see DB_common::nextID(), DB_common::getSequenceName(), - * DB_msql::createSequence(), DB_msql::dropSequence() - */ - function nextId($seq_name, $ondemand = true) - { - $seqname = $this->getSequenceName($seq_name); - $repeat = false; - do { - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $result =& $this->query("SELECT _seq FROM ${seqname}"); - $this->popErrorHandling(); - if ($ondemand && DB::isError($result) && - $result->getCode() == DB_ERROR_NOSUCHTABLE) { - $repeat = true; - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $result = $this->createSequence($seq_name); - $this->popErrorHandling(); - if (DB::isError($result)) { - return $this->raiseError($result); - } - } else { - $repeat = false; - } - } while ($repeat); - if (DB::isError($result)) { - return $this->raiseError($result); - } - $arr = $result->fetchRow(DB_FETCHMODE_ORDERED); - $result->free(); - return $arr[0]; - } - - // }}} - // {{{ createSequence() - - /** - * Creates a new sequence - * - * Also creates a new table to associate the sequence with. Uses - * a separate table to ensure portability with other drivers. - * - * @param string $seq_name name of the new sequence - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::createSequence(), DB_common::getSequenceName(), - * DB_msql::nextID(), DB_msql::dropSequence() - */ - function createSequence($seq_name) - { - $seqname = $this->getSequenceName($seq_name); - $res = $this->query('CREATE TABLE ' . $seqname - . ' (id INTEGER NOT NULL)'); - if (DB::isError($res)) { - return $res; - } - $res = $this->query("CREATE SEQUENCE ON ${seqname}"); - return $res; - } - - // }}} - // {{{ dropSequence() - - /** - * Deletes a sequence - * - * @param string $seq_name name of the sequence to be deleted - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::dropSequence(), DB_common::getSequenceName(), - * DB_msql::nextID(), DB_msql::createSequence() - */ - function dropSequence($seq_name) - { - return $this->query('DROP TABLE ' . $this->getSequenceName($seq_name)); - } - - // }}} - // {{{ quoteIdentifier() - - /** - * mSQL does not support delimited identifiers - * - * @param string $str the identifier name to be quoted - * - * @return object a DB_Error object - * - * @see DB_common::quoteIdentifier() - * @since Method available since Release 1.7.0 - */ - function quoteIdentifier($str) - { - return $this->raiseError(DB_ERROR_UNSUPPORTED); - } - - // }}} - // {{{ escapeSimple() - - /** - * Escapes a string according to the current DBMS's standards - * - * @param string $str the string to be escaped - * - * @return string the escaped string - * - * @see DB_common::quoteSmart() - * @since Method available since Release 1.7.0 - */ - function escapeSimple($str) - { - return addslashes($str); - } - - // }}} - // {{{ msqlRaiseError() - - /** - * Produces a DB_Error object regarding the current problem - * - * @param int $errno if the error is being manually raised pass a - * DB_ERROR* constant here. If this isn't passed - * the error information gathered from the DBMS. - * - * @return object the DB_Error object - * - * @see DB_common::raiseError(), - * DB_msql::errorNative(), DB_msql::errorCode() - */ - function msqlRaiseError($errno = null) - { - $native = $this->errorNative(); - if ($errno === null) { - $errno = $this->errorCode($native); - } - return $this->raiseError($errno, null, null, null, $native); - } - - // }}} - // {{{ errorNative() - - /** - * Gets the DBMS' native error message produced by the last query - * - * @return string the DBMS' error message - */ - function errorNative() - { - return @msql_error(); - } - - // }}} - // {{{ errorCode() - - /** - * Determines PEAR::DB error code from the database's text error message - * - * @param string $errormsg the error message returned from the database - * - * @return integer the error number from a DB_ERROR* constant - */ - function errorCode($errormsg) - { - static $error_regexps; - if (!isset($error_regexps)) { - $error_regexps = array( - '/^Access to database denied/i' - => DB_ERROR_ACCESS_VIOLATION, - '/^Bad index name/i' - => DB_ERROR_ALREADY_EXISTS, - '/^Bad order field/i' - => DB_ERROR_SYNTAX, - '/^Bad type for comparison/i' - => DB_ERROR_SYNTAX, - '/^Can\'t perform LIKE on/i' - => DB_ERROR_SYNTAX, - '/^Can\'t use TEXT fields in LIKE comparison/i' - => DB_ERROR_SYNTAX, - '/^Couldn\'t create temporary table/i' - => DB_ERROR_CANNOT_CREATE, - '/^Error creating table file/i' - => DB_ERROR_CANNOT_CREATE, - '/^Field .* cannot be null$/i' - => DB_ERROR_CONSTRAINT_NOT_NULL, - '/^Index (field|condition) .* cannot be null$/i' - => DB_ERROR_SYNTAX, - '/^Invalid date format/i' - => DB_ERROR_INVALID_DATE, - '/^Invalid time format/i' - => DB_ERROR_INVALID, - '/^Literal value for .* is wrong type$/i' - => DB_ERROR_INVALID_NUMBER, - '/^No Database Selected/i' - => DB_ERROR_NODBSELECTED, - '/^No value specified for field/i' - => DB_ERROR_VALUE_COUNT_ON_ROW, - '/^Non unique value for unique index/i' - => DB_ERROR_CONSTRAINT, - '/^Out of memory for temporary table/i' - => DB_ERROR_CANNOT_CREATE, - '/^Permission denied/i' - => DB_ERROR_ACCESS_VIOLATION, - '/^Reference to un-selected table/i' - => DB_ERROR_SYNTAX, - '/^syntax error/i' - => DB_ERROR_SYNTAX, - '/^Table .* exists$/i' - => DB_ERROR_ALREADY_EXISTS, - '/^Unknown database/i' - => DB_ERROR_NOSUCHDB, - '/^Unknown field/i' - => DB_ERROR_NOSUCHFIELD, - '/^Unknown (index|system variable)/i' - => DB_ERROR_NOT_FOUND, - '/^Unknown table/i' - => DB_ERROR_NOSUCHTABLE, - '/^Unqualified field/i' - => DB_ERROR_SYNTAX, - ); - } - - foreach ($error_regexps as $regexp => $code) { - if (preg_match($regexp, $errormsg)) { - return $code; - } - } - return DB_ERROR; - } - - // }}} - // {{{ tableInfo() - - /** - * Returns information about a table or a result set - * - * @param object|string $result DB_result object from a query or a - * string containing the name of a table. - * While this also accepts a query result - * resource identifier, this behavior is - * deprecated. - * @param int $mode a valid tableInfo mode - * - * @return array an associative array with the information requested. - * A DB_Error object on failure. - * - * @see DB_common::setOption() - */ - function tableInfo($result, $mode = null) - { - if (is_string($result)) { - /* - * Probably received a table name. - * Create a result resource identifier. - */ - $id = @msql_query("SELECT * FROM $result", - $this->connection); - $got_string = true; - } elseif (isset($result->result)) { - /* - * Probably received a result object. - * Extract the result resource identifier. - */ - $id = $result->result; - $got_string = false; - } else { - /* - * Probably received a result resource identifier. - * Copy it. - * Deprecated. Here for compatibility only. - */ - $id = $result; - $got_string = false; - } - - if (!is_resource($id)) { - return $this->raiseError(DB_ERROR_NEED_MORE_DATA); - } - - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) { - $case_func = 'strtolower'; - } else { - $case_func = 'strval'; - } - - $count = @msql_num_fields($id); - $res = array(); - - if ($mode) { - $res['num_fields'] = $count; - } - - for ($i = 0; $i < $count; $i++) { - $tmp = @msql_fetch_field($id); - - $flags = ''; - if ($tmp->not_null) { - $flags .= 'not_null '; - } - if ($tmp->unique) { - $flags .= 'unique_key '; - } - $flags = trim($flags); - - $res[$i] = array( - 'table' => $case_func($tmp->table), - 'name' => $case_func($tmp->name), - 'type' => $tmp->type, - 'len' => msql_field_len($id, $i), - 'flags' => $flags, - ); - - if ($mode & DB_TABLEINFO_ORDER) { - $res['order'][$res[$i]['name']] = $i; - } - if ($mode & DB_TABLEINFO_ORDERTABLE) { - $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i; - } - } - - // free the result only if we were called on a table - if ($got_string) { - @msql_free_result($id); - } - return $res; - } - - // }}} - // {{{ getSpecialQuery() - - /** - * Obtain a list of a given type of objects - * - * @param string $type the kind of objects you want to retrieve - * - * @return array the array containing the list of objects requested - * - * @access protected - * @see DB_common::getListOf() - */ - function getSpecialQuery($type) - { - switch ($type) { - case 'databases': - $id = @msql_list_dbs($this->connection); - break; - case 'tables': - $id = @msql_list_tables($this->dsn['database'], - $this->connection); - break; - default: - return null; - } - if (!$id) { - return $this->msqlRaiseError(); - } - $out = array(); - while ($row = @msql_fetch_row($id)) { - $out[] = $row[0]; - } - return $out; - } - - // }}} - -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ - -?> diff --git a/program/lib/DB/mssql.php b/program/lib/DB/mssql.php deleted file mode 100644 index 74f8cf4..0000000 --- a/program/lib/DB/mssql.php +++ /dev/null @@ -1,914 +0,0 @@ - - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: mssql.php 12 2005-10-02 11:36:35Z sparc $ - * @link http://pear.php.net/package/DB - */ - -/** - * Obtain the DB_common class so it can be extended from - */ -require_once 'DB/common.php'; - -/** - * The methods PEAR DB uses to interact with PHP's mssql extension - * for interacting with Microsoft SQL Server databases - * - * These methods overload the ones declared in DB_common. - * - * @category Database - * @package DB - * @author Sterling Hughes - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - */ -class DB_mssql extends DB_common -{ - // {{{ properties - - /** - * The DB driver type (mysql, oci8, odbc, etc.) - * @var string - */ - var $phptype = 'mssql'; - - /** - * The database syntax variant to be used (db2, access, etc.), if any - * @var string - */ - var $dbsyntax = 'mssql'; - - /** - * The capabilities of this DB implementation - * - * The 'new_link' element contains the PHP version that first provided - * new_link support for this DBMS. Contains false if it's unsupported. - * - * Meaning of the 'limit' element: - * + 'emulate' = emulate with fetch row by number - * + 'alter' = alter the query - * + false = skip rows - * - * @var array - */ - var $features = array( - 'limit' => 'emulate', - 'new_link' => false, - 'numrows' => true, - 'pconnect' => true, - 'prepare' => false, - 'ssl' => false, - 'transactions' => true, - ); - - /** - * A mapping of native error codes to DB error codes - * @var array - */ - // XXX Add here error codes ie: 'S100E' => DB_ERROR_SYNTAX - var $errorcode_map = array( - 110 => DB_ERROR_VALUE_COUNT_ON_ROW, - 155 => DB_ERROR_NOSUCHFIELD, - 170 => DB_ERROR_SYNTAX, - 207 => DB_ERROR_NOSUCHFIELD, - 208 => DB_ERROR_NOSUCHTABLE, - 245 => DB_ERROR_INVALID_NUMBER, - 515 => DB_ERROR_CONSTRAINT_NOT_NULL, - 547 => DB_ERROR_CONSTRAINT, - 1913 => DB_ERROR_ALREADY_EXISTS, - 2627 => DB_ERROR_CONSTRAINT, - 2714 => DB_ERROR_ALREADY_EXISTS, - 3701 => DB_ERROR_NOSUCHTABLE, - 8134 => DB_ERROR_DIVZERO, - ); - - /** - * The raw database connection created by PHP - * @var resource - */ - var $connection; - - /** - * The DSN information for connecting to a database - * @var array - */ - var $dsn = array(); - - - /** - * Should data manipulation queries be committed automatically? - * @var bool - * @access private - */ - var $autocommit = true; - - /** - * The quantity of transactions begun - * - * {@internal While this is private, it can't actually be designated - * private in PHP 5 because it is directly accessed in the test suite.}} - * - * @var integer - * @access private - */ - var $transaction_opcount = 0; - - /** - * The database specified in the DSN - * - * It's a fix to allow calls to different databases in the same script. - * - * @var string - * @access private - */ - var $_db = null; - - - // }}} - // {{{ constructor - - /** - * This constructor calls $this->DB_common() - * - * @return void - */ - function DB_mssql() - { - $this->DB_common(); - } - - // }}} - // {{{ connect() - - /** - * Connect to the database server, log in and open the database - * - * Don't call this method directly. Use DB::connect() instead. - * - * @param array $dsn the data source name - * @param bool $persistent should the connection be persistent? - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function connect($dsn, $persistent = false) - { - if (!PEAR::loadExtension('mssql') && !PEAR::loadExtension('sybase') - && !PEAR::loadExtension('sybase_ct')) - { - return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND); - } - - $this->dsn = $dsn; - if ($dsn['dbsyntax']) { - $this->dbsyntax = $dsn['dbsyntax']; - } - - $params = array( - $dsn['hostspec'] ? $dsn['hostspec'] : 'localhost', - $dsn['username'] ? $dsn['username'] : null, - $dsn['password'] ? $dsn['password'] : null, - ); - if ($dsn['port']) { - $params[0] .= ((substr(PHP_OS, 0, 3) == 'WIN') ? ',' : ':') - . $dsn['port']; - } - - $connect_function = $persistent ? 'mssql_pconnect' : 'mssql_connect'; - - $this->connection = @call_user_func_array($connect_function, $params); - - if (!$this->connection) { - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - @mssql_get_last_message()); - } - if ($dsn['database']) { - if (!@mssql_select_db($dsn['database'], $this->connection)) { - return $this->raiseError(DB_ERROR_NODBSELECTED, - null, null, null, - @mssql_get_last_message()); - } - $this->_db = $dsn['database']; - } - return DB_OK; - } - - // }}} - // {{{ disconnect() - - /** - * Disconnects from the database server - * - * @return bool TRUE on success, FALSE on failure - */ - function disconnect() - { - $ret = @mssql_close($this->connection); - $this->connection = null; - return $ret; - } - - // }}} - // {{{ simpleQuery() - - /** - * Sends a query to the database server - * - * @param string the SQL query string - * - * @return mixed + a PHP result resrouce for successful SELECT queries - * + the DB_OK constant for other successful queries - * + a DB_Error object on failure - */ - function simpleQuery($query) - { - $ismanip = DB::isManip($query); - $this->last_query = $query; - if (!@mssql_select_db($this->_db, $this->connection)) { - return $this->mssqlRaiseError(DB_ERROR_NODBSELECTED); - } - $query = $this->modifyQuery($query); - if (!$this->autocommit && $ismanip) { - if ($this->transaction_opcount == 0) { - $result = @mssql_query('BEGIN TRAN', $this->connection); - if (!$result) { - return $this->mssqlRaiseError(); - } - } - $this->transaction_opcount++; - } - $result = @mssql_query($query, $this->connection); - if (!$result) { - return $this->mssqlRaiseError(); - } - // Determine which queries that should return data, and which - // should return an error code only. - return $ismanip ? DB_OK : $result; - } - - // }}} - // {{{ nextResult() - - /** - * Move the internal mssql result pointer to the next available result - * - * @param a valid fbsql result resource - * - * @access public - * - * @return true if a result is available otherwise return false - */ - function nextResult($result) - { - return @mssql_next_result($result); - } - - // }}} - // {{{ fetchInto() - - /** - * Places a row from the result set into the given array - * - * Formating of the array and the data therein are configurable. - * See DB_result::fetchInto() for more information. - * - * This method is not meant to be called directly. Use - * DB_result::fetchInto() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result the query result resource - * @param array $arr the referenced array to put the data in - * @param int $fetchmode how the resulting array should be indexed - * @param int $rownum the row number to fetch (0 = first row) - * - * @return mixed DB_OK on success, NULL when the end of a result set is - * reached or on failure - * - * @see DB_result::fetchInto() - */ - function fetchInto($result, &$arr, $fetchmode, $rownum = null) - { - if ($rownum !== null) { - if (!@mssql_data_seek($result, $rownum)) { - return null; - } - } - if ($fetchmode & DB_FETCHMODE_ASSOC) { - $arr = @mssql_fetch_array($result, MSSQL_ASSOC); - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE && $arr) { - $arr = array_change_key_case($arr, CASE_LOWER); - } - } else { - $arr = @mssql_fetch_row($result); - } - if (!$arr) { - return null; - } - if ($this->options['portability'] & DB_PORTABILITY_RTRIM) { - $this->_rtrimArrayValues($arr); - } - if ($this->options['portability'] & DB_PORTABILITY_NULL_TO_EMPTY) { - $this->_convertNullArrayValuesToEmpty($arr); - } - return DB_OK; - } - - // }}} - // {{{ freeResult() - - /** - * Deletes the result set and frees the memory occupied by the result set - * - * This method is not meant to be called directly. Use - * DB_result::free() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return bool TRUE on success, FALSE if $result is invalid - * - * @see DB_result::free() - */ - function freeResult($result) - { - return @mssql_free_result($result); - } - - // }}} - // {{{ numCols() - - /** - * Gets the number of columns in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numCols() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of columns. A DB_Error object on failure. - * - * @see DB_result::numCols() - */ - function numCols($result) - { - $cols = @mssql_num_fields($result); - if (!$cols) { - return $this->mssqlRaiseError(); - } - return $cols; - } - - // }}} - // {{{ numRows() - - /** - * Gets the number of rows in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numRows() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of rows. A DB_Error object on failure. - * - * @see DB_result::numRows() - */ - function numRows($result) - { - $rows = @mssql_num_rows($result); - if ($rows === false) { - return $this->mssqlRaiseError(); - } - return $rows; - } - - // }}} - // {{{ autoCommit() - - /** - * Enables or disables automatic commits - * - * @param bool $onoff true turns it on, false turns it off - * - * @return int DB_OK on success. A DB_Error object if the driver - * doesn't support auto-committing transactions. - */ - function autoCommit($onoff = false) - { - // XXX if $this->transaction_opcount > 0, we should probably - // issue a warning here. - $this->autocommit = $onoff ? true : false; - return DB_OK; - } - - // }}} - // {{{ commit() - - /** - * Commits the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function commit() - { - if ($this->transaction_opcount > 0) { - if (!@mssql_select_db($this->_db, $this->connection)) { - return $this->mssqlRaiseError(DB_ERROR_NODBSELECTED); - } - $result = @mssql_query('COMMIT TRAN', $this->connection); - $this->transaction_opcount = 0; - if (!$result) { - return $this->mssqlRaiseError(); - } - } - return DB_OK; - } - - // }}} - // {{{ rollback() - - /** - * Reverts the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function rollback() - { - if ($this->transaction_opcount > 0) { - if (!@mssql_select_db($this->_db, $this->connection)) { - return $this->mssqlRaiseError(DB_ERROR_NODBSELECTED); - } - $result = @mssql_query('ROLLBACK TRAN', $this->connection); - $this->transaction_opcount = 0; - if (!$result) { - return $this->mssqlRaiseError(); - } - } - return DB_OK; - } - - // }}} - // {{{ affectedRows() - - /** - * Determines the number of rows affected by a data maniuplation query - * - * 0 is returned for queries that don't manipulate data. - * - * @return int the number of rows. A DB_Error object on failure. - */ - function affectedRows() - { - if (DB::isManip($this->last_query)) { - $res = @mssql_query('select @@rowcount', $this->connection); - if (!$res) { - return $this->mssqlRaiseError(); - } - $ar = @mssql_fetch_row($res); - if (!$ar) { - $result = 0; - } else { - @mssql_free_result($res); - $result = $ar[0]; - } - } else { - $result = 0; - } - return $result; - } - - // }}} - // {{{ nextId() - - /** - * Returns the next free id in a sequence - * - * @param string $seq_name name of the sequence - * @param boolean $ondemand when true, the seqence is automatically - * created if it does not exist - * - * @return int the next id number in the sequence. - * A DB_Error object on failure. - * - * @see DB_common::nextID(), DB_common::getSequenceName(), - * DB_mssql::createSequence(), DB_mssql::dropSequence() - */ - function nextId($seq_name, $ondemand = true) - { - $seqname = $this->getSequenceName($seq_name); - if (!@mssql_select_db($this->_db, $this->connection)) { - return $this->mssqlRaiseError(DB_ERROR_NODBSELECTED); - } - $repeat = 0; - do { - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $result = $this->query("INSERT INTO $seqname (vapor) VALUES (0)"); - $this->popErrorHandling(); - if ($ondemand && DB::isError($result) && - ($result->getCode() == DB_ERROR || $result->getCode() == DB_ERROR_NOSUCHTABLE)) - { - $repeat = 1; - $result = $this->createSequence($seq_name); - if (DB::isError($result)) { - return $this->raiseError($result); - } - } elseif (!DB::isError($result)) { - $result =& $this->query("SELECT @@IDENTITY FROM $seqname"); - $repeat = 0; - } else { - $repeat = false; - } - } while ($repeat); - if (DB::isError($result)) { - return $this->raiseError($result); - } - $result = $result->fetchRow(DB_FETCHMODE_ORDERED); - return $result[0]; - } - - /** - * Creates a new sequence - * - * @param string $seq_name name of the new sequence - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::createSequence(), DB_common::getSequenceName(), - * DB_mssql::nextID(), DB_mssql::dropSequence() - */ - function createSequence($seq_name) - { - return $this->query('CREATE TABLE ' - . $this->getSequenceName($seq_name) - . ' ([id] [int] IDENTITY (1, 1) NOT NULL,' - . ' [vapor] [int] NULL)'); - } - - // }}} - // {{{ dropSequence() - - /** - * Deletes a sequence - * - * @param string $seq_name name of the sequence to be deleted - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::dropSequence(), DB_common::getSequenceName(), - * DB_mssql::nextID(), DB_mssql::createSequence() - */ - function dropSequence($seq_name) - { - return $this->query('DROP TABLE ' . $this->getSequenceName($seq_name)); - } - - // }}} - // {{{ quoteIdentifier() - - /** - * Quotes a string so it can be safely used as a table or column name - * - * @param string $str identifier name to be quoted - * - * @return string quoted identifier string - * - * @see DB_common::quoteIdentifier() - * @since Method available since Release 1.6.0 - */ - function quoteIdentifier($str) - { - return '[' . str_replace(']', ']]', $str) . ']'; - } - - // }}} - // {{{ mssqlRaiseError() - - /** - * Produces a DB_Error object regarding the current problem - * - * @param int $errno if the error is being manually raised pass a - * DB_ERROR* constant here. If this isn't passed - * the error information gathered from the DBMS. - * - * @return object the DB_Error object - * - * @see DB_common::raiseError(), - * DB_mssql::errorNative(), DB_mssql::errorCode() - */ - function mssqlRaiseError($code = null) - { - $message = @mssql_get_last_message(); - if (!$code) { - $code = $this->errorNative(); - } - return $this->raiseError($this->errorCode($code, $message), - null, null, null, "$code - $message"); - } - - // }}} - // {{{ errorNative() - - /** - * Gets the DBMS' native error code produced by the last query - * - * @return int the DBMS' error code - */ - function errorNative() - { - $res = @mssql_query('select @@ERROR as ErrorCode', $this->connection); - if (!$res) { - return DB_ERROR; - } - $row = @mssql_fetch_row($res); - return $row[0]; - } - - // }}} - // {{{ errorCode() - - /** - * Determines PEAR::DB error code from mssql's native codes. - * - * If $nativecode isn't known yet, it will be looked up. - * - * @param mixed $nativecode mssql error code, if known - * @return integer an error number from a DB error constant - * @see errorNative() - */ - function errorCode($nativecode = null, $msg = '') - { - if (!$nativecode) { - $nativecode = $this->errorNative(); - } - if (isset($this->errorcode_map[$nativecode])) { - if ($nativecode == 3701 - && preg_match('/Cannot drop the index/i', $msg)) - { - return DB_ERROR_NOT_FOUND; - } - return $this->errorcode_map[$nativecode]; - } else { - return DB_ERROR; - } - } - - // }}} - // {{{ tableInfo() - - /** - * Returns information about a table or a result set - * - * NOTE: only supports 'table' and 'flags' if $result - * is a table name. - * - * @param object|string $result DB_result object from a query or a - * string containing the name of a table. - * While this also accepts a query result - * resource identifier, this behavior is - * deprecated. - * @param int $mode a valid tableInfo mode - * - * @return array an associative array with the information requested. - * A DB_Error object on failure. - * - * @see DB_common::tableInfo() - */ - function tableInfo($result, $mode = null) - { - if (is_string($result)) { - /* - * Probably received a table name. - * Create a result resource identifier. - */ - if (!@mssql_select_db($this->_db, $this->connection)) { - return $this->mssqlRaiseError(DB_ERROR_NODBSELECTED); - } - $id = @mssql_query("SELECT * FROM $result WHERE 1=0", - $this->connection); - $got_string = true; - } elseif (isset($result->result)) { - /* - * Probably received a result object. - * Extract the result resource identifier. - */ - $id = $result->result; - $got_string = false; - } else { - /* - * Probably received a result resource identifier. - * Copy it. - * Deprecated. Here for compatibility only. - */ - $id = $result; - $got_string = false; - } - - if (!is_resource($id)) { - return $this->mssqlRaiseError(DB_ERROR_NEED_MORE_DATA); - } - - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) { - $case_func = 'strtolower'; - } else { - $case_func = 'strval'; - } - - $count = @mssql_num_fields($id); - $res = array(); - - if ($mode) { - $res['num_fields'] = $count; - } - - for ($i = 0; $i < $count; $i++) { - $res[$i] = array( - 'table' => $got_string ? $case_func($result) : '', - 'name' => $case_func(@mssql_field_name($id, $i)), - 'type' => @mssql_field_type($id, $i), - 'len' => @mssql_field_length($id, $i), - // We only support flags for table - 'flags' => $got_string - ? $this->_mssql_field_flags($result, - @mssql_field_name($id, $i)) - : '', - ); - if ($mode & DB_TABLEINFO_ORDER) { - $res['order'][$res[$i]['name']] = $i; - } - if ($mode & DB_TABLEINFO_ORDERTABLE) { - $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i; - } - } - - // free the result only if we were called on a table - if ($got_string) { - @mssql_free_result($id); - } - return $res; - } - - // }}} - // {{{ _mssql_field_flags() - - /** - * Get a column's flags - * - * Supports "not_null", "primary_key", - * "auto_increment" (mssql identity), "timestamp" (mssql timestamp), - * "unique_key" (mssql unique index, unique check or primary_key) and - * "multiple_key" (multikey index) - * - * mssql timestamp is NOT similar to the mysql timestamp so this is maybe - * not useful at all - is the behaviour of mysql_field_flags that primary - * keys are alway unique? is the interpretation of multiple_key correct? - * - * @param string $table the table name - * @param string $column the field name - * - * @return string the flags - * - * @access private - * @author Joern Barthel - */ - function _mssql_field_flags($table, $column) - { - static $tableName = null; - static $flags = array(); - - if ($table != $tableName) { - - $flags = array(); - $tableName = $table; - - // get unique and primary keys - $res = $this->getAll("EXEC SP_HELPINDEX[$table]", DB_FETCHMODE_ASSOC); - - foreach ($res as $val) { - $keys = explode(', ', $val['index_keys']); - - if (sizeof($keys) > 1) { - foreach ($keys as $key) { - $this->_add_flag($flags[$key], 'multiple_key'); - } - } - - if (strpos($val['index_description'], 'primary key')) { - foreach ($keys as $key) { - $this->_add_flag($flags[$key], 'primary_key'); - } - } elseif (strpos($val['index_description'], 'unique')) { - foreach ($keys as $key) { - $this->_add_flag($flags[$key], 'unique_key'); - } - } - } - - // get auto_increment, not_null and timestamp - $res = $this->getAll("EXEC SP_COLUMNS[$table]", DB_FETCHMODE_ASSOC); - - foreach ($res as $val) { - $val = array_change_key_case($val, CASE_LOWER); - if ($val['nullable'] == '0') { - $this->_add_flag($flags[$val['column_name']], 'not_null'); - } - if (strpos($val['type_name'], 'identity')) { - $this->_add_flag($flags[$val['column_name']], 'auto_increment'); - } - if (strpos($val['type_name'], 'timestamp')) { - $this->_add_flag($flags[$val['column_name']], 'timestamp'); - } - } - } - - if (array_key_exists($column, $flags)) { - return(implode(' ', $flags[$column])); - } - return ''; - } - - // }}} - // {{{ _add_flag() - - /** - * Adds a string to the flags array if the flag is not yet in there - * - if there is no flag present the array is created - * - * @param array &$array the reference to the flag-array - * @param string $value the flag value - * - * @return void - * - * @access private - * @author Joern Barthel - */ - function _add_flag(&$array, $value) - { - if (!is_array($array)) { - $array = array($value); - } elseif (!in_array($value, $array)) { - array_push($array, $value); - } - } - - // }}} - // {{{ getSpecialQuery() - - /** - * Obtains the query string needed for listing a given type of objects - * - * @param string $type the kind of objects you want to retrieve - * - * @return string the SQL query string or null if the driver doesn't - * support the object type requested - * - * @access protected - * @see DB_common::getListOf() - */ - function getSpecialQuery($type) - { - switch ($type) { - case 'tables': - return "SELECT name FROM sysobjects WHERE type = 'U'" - . ' ORDER BY name'; - case 'views': - return "SELECT name FROM sysobjects WHERE type = 'V'"; - default: - return null; - } - } - - // }}} -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ - -?> diff --git a/program/lib/DB/mysql.php b/program/lib/DB/mysql.php deleted file mode 100644 index d443497..0000000 --- a/program/lib/DB/mysql.php +++ /dev/null @@ -1,1034 +0,0 @@ - - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: mysql.php 12 2005-10-02 11:36:35Z sparc $ - * @link http://pear.php.net/package/DB - */ - -/** - * Obtain the DB_common class so it can be extended from - */ -require_once 'DB/common.php'; - -/** - * The methods PEAR DB uses to interact with PHP's mysql extension - * for interacting with MySQL databases - * - * These methods overload the ones declared in DB_common. - * - * @category Database - * @package DB - * @author Stig Bakken - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - */ -class DB_mysql extends DB_common -{ - // {{{ properties - - /** - * The DB driver type (mysql, oci8, odbc, etc.) - * @var string - */ - var $phptype = 'mysql'; - - /** - * The database syntax variant to be used (db2, access, etc.), if any - * @var string - */ - var $dbsyntax = 'mysql'; - - /** - * The capabilities of this DB implementation - * - * The 'new_link' element contains the PHP version that first provided - * new_link support for this DBMS. Contains false if it's unsupported. - * - * Meaning of the 'limit' element: - * + 'emulate' = emulate with fetch row by number - * + 'alter' = alter the query - * + false = skip rows - * - * @var array - */ - var $features = array( - 'limit' => 'alter', - 'new_link' => '4.2.0', - 'numrows' => true, - 'pconnect' => true, - 'prepare' => false, - 'ssl' => false, - 'transactions' => true, - ); - - /** - * A mapping of native error codes to DB error codes - * @var array - */ - var $errorcode_map = array( - 1004 => DB_ERROR_CANNOT_CREATE, - 1005 => DB_ERROR_CANNOT_CREATE, - 1006 => DB_ERROR_CANNOT_CREATE, - 1007 => DB_ERROR_ALREADY_EXISTS, - 1008 => DB_ERROR_CANNOT_DROP, - 1022 => DB_ERROR_ALREADY_EXISTS, - 1044 => DB_ERROR_ACCESS_VIOLATION, - 1046 => DB_ERROR_NODBSELECTED, - 1048 => DB_ERROR_CONSTRAINT, - 1049 => DB_ERROR_NOSUCHDB, - 1050 => DB_ERROR_ALREADY_EXISTS, - 1051 => DB_ERROR_NOSUCHTABLE, - 1054 => DB_ERROR_NOSUCHFIELD, - 1061 => DB_ERROR_ALREADY_EXISTS, - 1062 => DB_ERROR_ALREADY_EXISTS, - 1064 => DB_ERROR_SYNTAX, - 1091 => DB_ERROR_NOT_FOUND, - 1100 => DB_ERROR_NOT_LOCKED, - 1136 => DB_ERROR_VALUE_COUNT_ON_ROW, - 1142 => DB_ERROR_ACCESS_VIOLATION, - 1146 => DB_ERROR_NOSUCHTABLE, - 1216 => DB_ERROR_CONSTRAINT, - 1217 => DB_ERROR_CONSTRAINT, - ); - - /** - * The raw database connection created by PHP - * @var resource - */ - var $connection; - - /** - * The DSN information for connecting to a database - * @var array - */ - var $dsn = array(); - - - /** - * Should data manipulation queries be committed automatically? - * @var bool - * @access private - */ - var $autocommit = true; - - /** - * The quantity of transactions begun - * - * {@internal While this is private, it can't actually be designated - * private in PHP 5 because it is directly accessed in the test suite.}} - * - * @var integer - * @access private - */ - var $transaction_opcount = 0; - - /** - * The database specified in the DSN - * - * It's a fix to allow calls to different databases in the same script. - * - * @var string - * @access private - */ - var $_db = ''; - - - // }}} - // {{{ constructor - - /** - * This constructor calls $this->DB_common() - * - * @return void - */ - function DB_mysql() - { - $this->DB_common(); - } - - // }}} - // {{{ connect() - - /** - * Connect to the database server, log in and open the database - * - * Don't call this method directly. Use DB::connect() instead. - * - * PEAR DB's mysql driver supports the following extra DSN options: - * + new_link If set to true, causes subsequent calls to connect() - * to return a new connection link instead of the - * existing one. WARNING: this is not portable to - * other DBMS's. Available since PEAR DB 1.7.0. - * + client_flags Any combination of MYSQL_CLIENT_* constants. - * Only used if PHP is at version 4.3.0 or greater. - * Available since PEAR DB 1.7.0. - * - * @param array $dsn the data source name - * @param bool $persistent should the connection be persistent? - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function connect($dsn, $persistent = false) - { - if (!PEAR::loadExtension('mysql')) { - return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND); - } - - $this->dsn = $dsn; - if ($dsn['dbsyntax']) { - $this->dbsyntax = $dsn['dbsyntax']; - } - - $params = array(); - if ($dsn['protocol'] && $dsn['protocol'] == 'unix') { - $params[0] = ':' . $dsn['socket']; - } else { - $params[0] = $dsn['hostspec'] ? $dsn['hostspec'] - : 'localhost'; - if ($dsn['port']) { - $params[0] .= ':' . $dsn['port']; - } - } - $params[] = $dsn['username'] ? $dsn['username'] : null; - $params[] = $dsn['password'] ? $dsn['password'] : null; - - if (!$persistent) { - if (isset($dsn['new_link']) - && ($dsn['new_link'] == 'true' || $dsn['new_link'] === true)) - { - $params[] = true; - } else { - $params[] = false; - } - } - if (version_compare(phpversion(), '4.3.0', '>=')) { - $params[] = isset($dsn['client_flags']) - ? $dsn['client_flags'] : null; - } - - $connect_function = $persistent ? 'mysql_pconnect' : 'mysql_connect'; - - $ini = ini_get('track_errors'); - $php_errormsg = ''; - if ($ini) { - $this->connection = @call_user_func_array($connect_function, - $params); - } else { - ini_set('track_errors', 1); - $this->connection = @call_user_func_array($connect_function, - $params); - ini_set('track_errors', $ini); - } - - if (!$this->connection) { - if (($err = @mysql_error()) != '') { - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - $err); - } else { - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - $php_errormsg); - } - } - - if ($dsn['database']) { - if (!@mysql_select_db($dsn['database'], $this->connection)) { - return $this->mysqlRaiseError(); - } - $this->_db = $dsn['database']; - } - - return DB_OK; - } - - // }}} - // {{{ disconnect() - - /** - * Disconnects from the database server - * - * @return bool TRUE on success, FALSE on failure - */ - function disconnect() - { - $ret = @mysql_close($this->connection); - $this->connection = null; - return $ret; - } - - // }}} - // {{{ simpleQuery() - - /** - * Sends a query to the database server - * - * Generally uses mysql_query(). If you want to use - * mysql_unbuffered_query() set the "result_buffering" option to 0 using - * setOptions(). This option was added in Release 1.7.0. - * - * @param string the SQL query string - * - * @return mixed + a PHP result resrouce for successful SELECT queries - * + the DB_OK constant for other successful queries - * + a DB_Error object on failure - */ - function simpleQuery($query) - { - $ismanip = DB::isManip($query); - $this->last_query = $query; - $query = $this->modifyQuery($query); - if ($this->_db) { - if (!@mysql_select_db($this->_db, $this->connection)) { - return $this->mysqlRaiseError(DB_ERROR_NODBSELECTED); - } - } - if (!$this->autocommit && $ismanip) { - if ($this->transaction_opcount == 0) { - $result = @mysql_query('SET AUTOCOMMIT=0', $this->connection); - $result = @mysql_query('BEGIN', $this->connection); - if (!$result) { - return $this->mysqlRaiseError(); - } - } - $this->transaction_opcount++; - } - if (!$this->options['result_buffering']) { - $result = @mysql_unbuffered_query($query, $this->connection); - } else { - $result = @mysql_query($query, $this->connection); - } - if (!$result) { - return $this->mysqlRaiseError(); - } - if (is_resource($result)) { - return $result; - } - return DB_OK; - } - - // }}} - // {{{ nextResult() - - /** - * Move the internal mysql result pointer to the next available result - * - * This method has not been implemented yet. - * - * @param a valid sql result resource - * - * @return false - */ - function nextResult($result) - { - return false; - } - - // }}} - // {{{ fetchInto() - - /** - * Places a row from the result set into the given array - * - * Formating of the array and the data therein are configurable. - * See DB_result::fetchInto() for more information. - * - * This method is not meant to be called directly. Use - * DB_result::fetchInto() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result the query result resource - * @param array $arr the referenced array to put the data in - * @param int $fetchmode how the resulting array should be indexed - * @param int $rownum the row number to fetch (0 = first row) - * - * @return mixed DB_OK on success, NULL when the end of a result set is - * reached or on failure - * - * @see DB_result::fetchInto() - */ - function fetchInto($result, &$arr, $fetchmode, $rownum = null) - { - if ($rownum !== null) { - if (!@mysql_data_seek($result, $rownum)) { - return null; - } - } - if ($fetchmode & DB_FETCHMODE_ASSOC) { - $arr = @mysql_fetch_array($result, MYSQL_ASSOC); - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE && $arr) { - $arr = array_change_key_case($arr, CASE_LOWER); - } - } else { - $arr = @mysql_fetch_row($result); - } - if (!$arr) { - return null; - } - if ($this->options['portability'] & DB_PORTABILITY_RTRIM) { - /* - * Even though this DBMS already trims output, we do this because - * a field might have intentional whitespace at the end that - * gets removed by DB_PORTABILITY_RTRIM under another driver. - */ - $this->_rtrimArrayValues($arr); - } - if ($this->options['portability'] & DB_PORTABILITY_NULL_TO_EMPTY) { - $this->_convertNullArrayValuesToEmpty($arr); - } - return DB_OK; - } - - // }}} - // {{{ freeResult() - - /** - * Deletes the result set and frees the memory occupied by the result set - * - * This method is not meant to be called directly. Use - * DB_result::free() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return bool TRUE on success, FALSE if $result is invalid - * - * @see DB_result::free() - */ - function freeResult($result) - { - return @mysql_free_result($result); - } - - // }}} - // {{{ numCols() - - /** - * Gets the number of columns in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numCols() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of columns. A DB_Error object on failure. - * - * @see DB_result::numCols() - */ - function numCols($result) - { - $cols = @mysql_num_fields($result); - if (!$cols) { - return $this->mysqlRaiseError(); - } - return $cols; - } - - // }}} - // {{{ numRows() - - /** - * Gets the number of rows in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numRows() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of rows. A DB_Error object on failure. - * - * @see DB_result::numRows() - */ - function numRows($result) - { - $rows = @mysql_num_rows($result); - if ($rows === null) { - return $this->mysqlRaiseError(); - } - return $rows; - } - - // }}} - // {{{ autoCommit() - - /** - * Enables or disables automatic commits - * - * @param bool $onoff true turns it on, false turns it off - * - * @return int DB_OK on success. A DB_Error object if the driver - * doesn't support auto-committing transactions. - */ - function autoCommit($onoff = false) - { - // XXX if $this->transaction_opcount > 0, we should probably - // issue a warning here. - $this->autocommit = $onoff ? true : false; - return DB_OK; - } - - // }}} - // {{{ commit() - - /** - * Commits the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function commit() - { - if ($this->transaction_opcount > 0) { - if ($this->_db) { - if (!@mysql_select_db($this->_db, $this->connection)) { - return $this->mysqlRaiseError(DB_ERROR_NODBSELECTED); - } - } - $result = @mysql_query('COMMIT', $this->connection); - $result = @mysql_query('SET AUTOCOMMIT=1', $this->connection); - $this->transaction_opcount = 0; - if (!$result) { - return $this->mysqlRaiseError(); - } - } - return DB_OK; - } - - // }}} - // {{{ rollback() - - /** - * Reverts the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function rollback() - { - if ($this->transaction_opcount > 0) { - if ($this->_db) { - if (!@mysql_select_db($this->_db, $this->connection)) { - return $this->mysqlRaiseError(DB_ERROR_NODBSELECTED); - } - } - $result = @mysql_query('ROLLBACK', $this->connection); - $result = @mysql_query('SET AUTOCOMMIT=1', $this->connection); - $this->transaction_opcount = 0; - if (!$result) { - return $this->mysqlRaiseError(); - } - } - return DB_OK; - } - - // }}} - // {{{ affectedRows() - - /** - * Determines the number of rows affected by a data maniuplation query - * - * 0 is returned for queries that don't manipulate data. - * - * @return int the number of rows. A DB_Error object on failure. - */ - function affectedRows() - { - if (DB::isManip($this->last_query)) { - return @mysql_affected_rows($this->connection); - } else { - return 0; - } - } - - // }}} - // {{{ nextId() - - /** - * Returns the next free id in a sequence - * - * @param string $seq_name name of the sequence - * @param boolean $ondemand when true, the seqence is automatically - * created if it does not exist - * - * @return int the next id number in the sequence. - * A DB_Error object on failure. - * - * @see DB_common::nextID(), DB_common::getSequenceName(), - * DB_mysql::createSequence(), DB_mysql::dropSequence() - */ - function nextId($seq_name, $ondemand = true) - { - $seqname = $this->getSequenceName($seq_name); - do { - $repeat = 0; - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $result = $this->query("UPDATE ${seqname} ". - 'SET id=LAST_INSERT_ID(id+1)'); - $this->popErrorHandling(); - if ($result === DB_OK) { - // COMMON CASE - $id = @mysql_insert_id($this->connection); - if ($id != 0) { - return $id; - } - // EMPTY SEQ TABLE - // Sequence table must be empty for some reason, so fill - // it and return 1 and obtain a user-level lock - $result = $this->getOne("SELECT GET_LOCK('${seqname}_lock',10)"); - if (DB::isError($result)) { - return $this->raiseError($result); - } - if ($result == 0) { - // Failed to get the lock - return $this->mysqlRaiseError(DB_ERROR_NOT_LOCKED); - } - - // add the default value - $result = $this->query("REPLACE INTO ${seqname} (id) VALUES (0)"); - if (DB::isError($result)) { - return $this->raiseError($result); - } - - // Release the lock - $result = $this->getOne('SELECT RELEASE_LOCK(' - . "'${seqname}_lock')"); - if (DB::isError($result)) { - return $this->raiseError($result); - } - // We know what the result will be, so no need to try again - return 1; - - } elseif ($ondemand && DB::isError($result) && - $result->getCode() == DB_ERROR_NOSUCHTABLE) - { - // ONDEMAND TABLE CREATION - $result = $this->createSequence($seq_name); - if (DB::isError($result)) { - return $this->raiseError($result); - } else { - $repeat = 1; - } - - } elseif (DB::isError($result) && - $result->getCode() == DB_ERROR_ALREADY_EXISTS) - { - // BACKWARDS COMPAT - // see _BCsequence() comment - $result = $this->_BCsequence($seqname); - if (DB::isError($result)) { - return $this->raiseError($result); - } - $repeat = 1; - } - } while ($repeat); - - return $this->raiseError($result); - } - - // }}} - // {{{ createSequence() - - /** - * Creates a new sequence - * - * @param string $seq_name name of the new sequence - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::createSequence(), DB_common::getSequenceName(), - * DB_mysql::nextID(), DB_mysql::dropSequence() - */ - function createSequence($seq_name) - { - $seqname = $this->getSequenceName($seq_name); - $res = $this->query('CREATE TABLE ' . $seqname - . ' (id INTEGER UNSIGNED AUTO_INCREMENT NOT NULL,' - . ' PRIMARY KEY(id))'); - if (DB::isError($res)) { - return $res; - } - // insert yields value 1, nextId call will generate ID 2 - $res = $this->query("INSERT INTO ${seqname} (id) VALUES (0)"); - if (DB::isError($res)) { - return $res; - } - // so reset to zero - return $this->query("UPDATE ${seqname} SET id = 0"); - } - - // }}} - // {{{ dropSequence() - - /** - * Deletes a sequence - * - * @param string $seq_name name of the sequence to be deleted - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::dropSequence(), DB_common::getSequenceName(), - * DB_mysql::nextID(), DB_mysql::createSequence() - */ - function dropSequence($seq_name) - { - return $this->query('DROP TABLE ' . $this->getSequenceName($seq_name)); - } - - // }}} - // {{{ _BCsequence() - - /** - * Backwards compatibility with old sequence emulation implementation - * (clean up the dupes) - * - * @param string $seqname the sequence name to clean up - * - * @return bool true on success. A DB_Error object on failure. - * - * @access private - */ - function _BCsequence($seqname) - { - // Obtain a user-level lock... this will release any previous - // application locks, but unlike LOCK TABLES, it does not abort - // the current transaction and is much less frequently used. - $result = $this->getOne("SELECT GET_LOCK('${seqname}_lock',10)"); - if (DB::isError($result)) { - return $result; - } - if ($result == 0) { - // Failed to get the lock, can't do the conversion, bail - // with a DB_ERROR_NOT_LOCKED error - return $this->mysqlRaiseError(DB_ERROR_NOT_LOCKED); - } - - $highest_id = $this->getOne("SELECT MAX(id) FROM ${seqname}"); - if (DB::isError($highest_id)) { - return $highest_id; - } - // This should kill all rows except the highest - // We should probably do something if $highest_id isn't - // numeric, but I'm at a loss as how to handle that... - $result = $this->query('DELETE FROM ' . $seqname - . " WHERE id <> $highest_id"); - if (DB::isError($result)) { - return $result; - } - - // If another thread has been waiting for this lock, - // it will go thru the above procedure, but will have no - // real effect - $result = $this->getOne("SELECT RELEASE_LOCK('${seqname}_lock')"); - if (DB::isError($result)) { - return $result; - } - return true; - } - - // }}} - // {{{ quoteIdentifier() - - /** - * Quotes a string so it can be safely used as a table or column name - * - * MySQL can't handle the backtick character (`) in - * table or column names. - * - * @param string $str identifier name to be quoted - * - * @return string quoted identifier string - * - * @see DB_common::quoteIdentifier() - * @since Method available since Release 1.6.0 - */ - function quoteIdentifier($str) - { - return '`' . $str . '`'; - } - - // }}} - // {{{ quote() - - /** - * @deprecated Deprecated in release 1.6.0 - */ - function quote($str) - { - return $this->quoteSmart($str); - } - - // }}} - // {{{ escapeSimple() - - /** - * Escapes a string according to the current DBMS's standards - * - * @param string $str the string to be escaped - * - * @return string the escaped string - * - * @see DB_common::quoteSmart() - * @since Method available since Release 1.6.0 - */ - function escapeSimple($str) - { - if (function_exists('mysql_real_escape_string')) { - return @mysql_real_escape_string($str, $this->connection); - } else { - return @mysql_escape_string($str); - } - } - - // }}} - // {{{ modifyQuery() - - /** - * Changes a query string for various DBMS specific reasons - * - * This little hack lets you know how many rows were deleted - * when running a "DELETE FROM table" query. Only implemented - * if the DB_PORTABILITY_DELETE_COUNT portability option is on. - * - * @param string $query the query string to modify - * - * @return string the modified query string - * - * @access protected - * @see DB_common::setOption() - */ - function modifyQuery($query) - { - if ($this->options['portability'] & DB_PORTABILITY_DELETE_COUNT) { - // "DELETE FROM table" gives 0 affected rows in MySQL. - // This little hack lets you know how many rows were deleted. - if (preg_match('/^\s*DELETE\s+FROM\s+(\S+)\s*$/i', $query)) { - $query = preg_replace('/^\s*DELETE\s+FROM\s+(\S+)\s*$/', - 'DELETE FROM \1 WHERE 1=1', $query); - } - } - return $query; - } - - // }}} - // {{{ modifyLimitQuery() - - /** - * Adds LIMIT clauses to a query string according to current DBMS standards - * - * @param string $query the query to modify - * @param int $from the row to start to fetching (0 = the first row) - * @param int $count the numbers of rows to fetch - * @param mixed $params array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 placeholder for non-array - * parameters or 1 placeholder per array element. - * - * @return string the query string with LIMIT clauses added - * - * @access protected - */ - function modifyLimitQuery($query, $from, $count, $params = array()) - { - if (DB::isManip($query)) { - return $query . " LIMIT $count"; - } else { - return $query . " LIMIT $from, $count"; - } - } - - // }}} - // {{{ mysqlRaiseError() - - /** - * Produces a DB_Error object regarding the current problem - * - * @param int $errno if the error is being manually raised pass a - * DB_ERROR* constant here. If this isn't passed - * the error information gathered from the DBMS. - * - * @return object the DB_Error object - * - * @see DB_common::raiseError(), - * DB_mysql::errorNative(), DB_common::errorCode() - */ - function mysqlRaiseError($errno = null) - { - if ($errno === null) { - if ($this->options['portability'] & DB_PORTABILITY_ERRORS) { - $this->errorcode_map[1022] = DB_ERROR_CONSTRAINT; - $this->errorcode_map[1048] = DB_ERROR_CONSTRAINT_NOT_NULL; - $this->errorcode_map[1062] = DB_ERROR_CONSTRAINT; - } else { - // Doing this in case mode changes during runtime. - $this->errorcode_map[1022] = DB_ERROR_ALREADY_EXISTS; - $this->errorcode_map[1048] = DB_ERROR_CONSTRAINT; - $this->errorcode_map[1062] = DB_ERROR_ALREADY_EXISTS; - } - $errno = $this->errorCode(mysql_errno($this->connection)); - } - return $this->raiseError($errno, null, null, null, - @mysql_errno($this->connection) . ' ** ' . - @mysql_error($this->connection)); - } - - // }}} - // {{{ errorNative() - - /** - * Gets the DBMS' native error code produced by the last query - * - * @return int the DBMS' error code - */ - function errorNative() - { - return @mysql_errno($this->connection); - } - - // }}} - // {{{ tableInfo() - - /** - * Returns information about a table or a result set - * - * @param object|string $result DB_result object from a query or a - * string containing the name of a table. - * While this also accepts a query result - * resource identifier, this behavior is - * deprecated. - * @param int $mode a valid tableInfo mode - * - * @return array an associative array with the information requested. - * A DB_Error object on failure. - * - * @see DB_common::tableInfo() - */ - function tableInfo($result, $mode = null) - { - if (is_string($result)) { - /* - * Probably received a table name. - * Create a result resource identifier. - */ - $id = @mysql_list_fields($this->dsn['database'], - $result, $this->connection); - $got_string = true; - } elseif (isset($result->result)) { - /* - * Probably received a result object. - * Extract the result resource identifier. - */ - $id = $result->result; - $got_string = false; - } else { - /* - * Probably received a result resource identifier. - * Copy it. - * Deprecated. Here for compatibility only. - */ - $id = $result; - $got_string = false; - } - - if (!is_resource($id)) { - return $this->mysqlRaiseError(DB_ERROR_NEED_MORE_DATA); - } - - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) { - $case_func = 'strtolower'; - } else { - $case_func = 'strval'; - } - - $count = @mysql_num_fields($id); - $res = array(); - - if ($mode) { - $res['num_fields'] = $count; - } - - for ($i = 0; $i < $count; $i++) { - $res[$i] = array( - 'table' => $case_func(@mysql_field_table($id, $i)), - 'name' => $case_func(@mysql_field_name($id, $i)), - 'type' => @mysql_field_type($id, $i), - 'len' => @mysql_field_len($id, $i), - 'flags' => @mysql_field_flags($id, $i), - ); - if ($mode & DB_TABLEINFO_ORDER) { - $res['order'][$res[$i]['name']] = $i; - } - if ($mode & DB_TABLEINFO_ORDERTABLE) { - $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i; - } - } - - // free the result only if we were called on a table - if ($got_string) { - @mysql_free_result($id); - } - return $res; - } - - // }}} - // {{{ getSpecialQuery() - - /** - * Obtains the query string needed for listing a given type of objects - * - * @param string $type the kind of objects you want to retrieve - * - * @return string the SQL query string or null if the driver doesn't - * support the object type requested - * - * @access protected - * @see DB_common::getListOf() - */ - function getSpecialQuery($type) - { - switch ($type) { - case 'tables': - return 'SHOW TABLES'; - case 'users': - return 'SELECT DISTINCT User FROM mysql.user'; - case 'databases': - return 'SHOW DATABASES'; - default: - return null; - } - } - - // }}} - -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ - -?> diff --git a/program/lib/DB/mysqli.php b/program/lib/DB/mysqli.php deleted file mode 100644 index 8fca105..0000000 --- a/program/lib/DB/mysqli.php +++ /dev/null @@ -1,1076 +0,0 @@ - - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: mysqli.php 12 2005-10-02 11:36:35Z sparc $ - * @link http://pear.php.net/package/DB - */ - -/** - * Obtain the DB_common class so it can be extended from - */ -require_once 'DB/common.php'; - -/** - * The methods PEAR DB uses to interact with PHP's mysqli extension - * for interacting with MySQL databases - * - * This is for MySQL versions 4.1 and above. Requires PHP 5. - * - * Note that persistent connections no longer exist. - * - * These methods overload the ones declared in DB_common. - * - * @category Database - * @package DB - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - * @since Class functional since Release 1.6.3 - */ -class DB_mysqli extends DB_common -{ - // {{{ properties - - /** - * The DB driver type (mysql, oci8, odbc, etc.) - * @var string - */ - var $phptype = 'mysqli'; - - /** - * The database syntax variant to be used (db2, access, etc.), if any - * @var string - */ - var $dbsyntax = 'mysqli'; - - /** - * The capabilities of this DB implementation - * - * The 'new_link' element contains the PHP version that first provided - * new_link support for this DBMS. Contains false if it's unsupported. - * - * Meaning of the 'limit' element: - * + 'emulate' = emulate with fetch row by number - * + 'alter' = alter the query - * + false = skip rows - * - * @var array - */ - var $features = array( - 'limit' => 'alter', - 'new_link' => false, - 'numrows' => true, - 'pconnect' => false, - 'prepare' => false, - 'ssl' => true, - 'transactions' => true, - ); - - /** - * A mapping of native error codes to DB error codes - * @var array - */ - var $errorcode_map = array( - 1004 => DB_ERROR_CANNOT_CREATE, - 1005 => DB_ERROR_CANNOT_CREATE, - 1006 => DB_ERROR_CANNOT_CREATE, - 1007 => DB_ERROR_ALREADY_EXISTS, - 1008 => DB_ERROR_CANNOT_DROP, - 1022 => DB_ERROR_ALREADY_EXISTS, - 1044 => DB_ERROR_ACCESS_VIOLATION, - 1046 => DB_ERROR_NODBSELECTED, - 1048 => DB_ERROR_CONSTRAINT, - 1049 => DB_ERROR_NOSUCHDB, - 1050 => DB_ERROR_ALREADY_EXISTS, - 1051 => DB_ERROR_NOSUCHTABLE, - 1054 => DB_ERROR_NOSUCHFIELD, - 1061 => DB_ERROR_ALREADY_EXISTS, - 1062 => DB_ERROR_ALREADY_EXISTS, - 1064 => DB_ERROR_SYNTAX, - 1091 => DB_ERROR_NOT_FOUND, - 1100 => DB_ERROR_NOT_LOCKED, - 1136 => DB_ERROR_VALUE_COUNT_ON_ROW, - 1142 => DB_ERROR_ACCESS_VIOLATION, - 1146 => DB_ERROR_NOSUCHTABLE, - 1216 => DB_ERROR_CONSTRAINT, - 1217 => DB_ERROR_CONSTRAINT, - ); - - /** - * The raw database connection created by PHP - * @var resource - */ - var $connection; - - /** - * The DSN information for connecting to a database - * @var array - */ - var $dsn = array(); - - - /** - * Should data manipulation queries be committed automatically? - * @var bool - * @access private - */ - var $autocommit = true; - - /** - * The quantity of transactions begun - * - * {@internal While this is private, it can't actually be designated - * private in PHP 5 because it is directly accessed in the test suite.}} - * - * @var integer - * @access private - */ - var $transaction_opcount = 0; - - /** - * The database specified in the DSN - * - * It's a fix to allow calls to different databases in the same script. - * - * @var string - * @access private - */ - var $_db = ''; - - /** - * Array for converting MYSQLI_*_FLAG constants to text values - * @var array - * @access public - * @since Property available since Release 1.6.5 - */ - var $mysqli_flags = array( - MYSQLI_NOT_NULL_FLAG => 'not_null', - MYSQLI_PRI_KEY_FLAG => 'primary_key', - MYSQLI_UNIQUE_KEY_FLAG => 'unique_key', - MYSQLI_MULTIPLE_KEY_FLAG => 'multiple_key', - MYSQLI_BLOB_FLAG => 'blob', - MYSQLI_UNSIGNED_FLAG => 'unsigned', - MYSQLI_ZEROFILL_FLAG => 'zerofill', - MYSQLI_AUTO_INCREMENT_FLAG => 'auto_increment', - MYSQLI_TIMESTAMP_FLAG => 'timestamp', - MYSQLI_SET_FLAG => 'set', - // MYSQLI_NUM_FLAG => 'numeric', // unnecessary - // MYSQLI_PART_KEY_FLAG => 'multiple_key', // duplicatvie - MYSQLI_GROUP_FLAG => 'group_by' - ); - - /** - * Array for converting MYSQLI_TYPE_* constants to text values - * @var array - * @access public - * @since Property available since Release 1.6.5 - */ - var $mysqli_types = array( - MYSQLI_TYPE_DECIMAL => 'decimal', - MYSQLI_TYPE_TINY => 'tinyint', - MYSQLI_TYPE_SHORT => 'int', - MYSQLI_TYPE_LONG => 'int', - MYSQLI_TYPE_FLOAT => 'float', - MYSQLI_TYPE_DOUBLE => 'double', - // MYSQLI_TYPE_NULL => 'DEFAULT NULL', // let flags handle it - MYSQLI_TYPE_TIMESTAMP => 'timestamp', - MYSQLI_TYPE_LONGLONG => 'bigint', - MYSQLI_TYPE_INT24 => 'mediumint', - MYSQLI_TYPE_DATE => 'date', - MYSQLI_TYPE_TIME => 'time', - MYSQLI_TYPE_DATETIME => 'datetime', - MYSQLI_TYPE_YEAR => 'year', - MYSQLI_TYPE_NEWDATE => 'date', - MYSQLI_TYPE_ENUM => 'enum', - MYSQLI_TYPE_SET => 'set', - MYSQLI_TYPE_TINY_BLOB => 'tinyblob', - MYSQLI_TYPE_MEDIUM_BLOB => 'mediumblob', - MYSQLI_TYPE_LONG_BLOB => 'longblob', - MYSQLI_TYPE_BLOB => 'blob', - MYSQLI_TYPE_VAR_STRING => 'varchar', - MYSQLI_TYPE_STRING => 'char', - MYSQLI_TYPE_GEOMETRY => 'geometry', - ); - - - // }}} - // {{{ constructor - - /** - * This constructor calls $this->DB_common() - * - * @return void - */ - function DB_mysqli() - { - $this->DB_common(); - } - - // }}} - // {{{ connect() - - /** - * Connect to the database server, log in and open the database - * - * Don't call this method directly. Use DB::connect() instead. - * - * PEAR DB's mysqli driver supports the following extra DSN options: - * + When the 'ssl' $option passed to DB::connect() is true: - * + key The path to the key file. - * + cert The path to the certificate file. - * + ca The path to the certificate authority file. - * + capath The path to a directory that contains trusted SSL - * CA certificates in pem format. - * + cipher The list of allowable ciphers for SSL encryption. - * - * Example of how to connect using SSL: - * - * require_once 'DB.php'; - * - * $dsn = array( - * 'phptype' => 'mysqli', - * 'username' => 'someuser', - * 'password' => 'apasswd', - * 'hostspec' => 'localhost', - * 'database' => 'thedb', - * 'key' => 'client-key.pem', - * 'cert' => 'client-cert.pem', - * 'ca' => 'cacert.pem', - * 'capath' => '/path/to/ca/dir', - * 'cipher' => 'AES', - * ); - * - * $options = array( - * 'ssl' => true, - * ); - * - * $db =& DB::connect($dsn, $options); - * if (PEAR::isError($db)) { - * die($db->getMessage()); - * } - * - * - * @param array $dsn the data source name - * @param bool $persistent should the connection be persistent? - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function connect($dsn, $persistent = false) - { - if (!PEAR::loadExtension('mysqli')) { - return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND); - } - - $this->dsn = $dsn; - if ($dsn['dbsyntax']) { - $this->dbsyntax = $dsn['dbsyntax']; - } - - $ini = ini_get('track_errors'); - ini_set('track_errors', 1); - $php_errormsg = ''; - - if ($this->getOption('ssl') === true) { - $init = mysqli_init(); - mysqli_ssl_set( - $init, - empty($dsn['key']) ? null : $dsn['key'], - empty($dsn['cert']) ? null : $dsn['cert'], - empty($dsn['ca']) ? null : $dsn['ca'], - empty($dsn['capath']) ? null : $dsn['capath'], - empty($dsn['cipher']) ? null : $dsn['cipher'] - ); - if ($this->connection = @mysqli_real_connect( - $init, - $dsn['hostspec'], - $dsn['username'], - $dsn['password'], - $dsn['database'], - $dsn['port'], - $dsn['socket'])) - { - $this->connection = $init; - } - } else { - $this->connection = @mysqli_connect( - $dsn['hostspec'], - $dsn['username'], - $dsn['password'], - $dsn['database'], - $dsn['port'], - $dsn['socket'] - ); - } - - ini_set('track_errors', $ini); - - if (!$this->connection) { - if (($err = @mysqli_connect_error()) != '') { - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - $err); - } else { - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - $php_errormsg); - } - } - - if ($dsn['database']) { - $this->_db = $dsn['database']; - } - - return DB_OK; - } - - // }}} - // {{{ disconnect() - - /** - * Disconnects from the database server - * - * @return bool TRUE on success, FALSE on failure - */ - function disconnect() - { - $ret = @mysqli_close($this->connection); - $this->connection = null; - return $ret; - } - - // }}} - // {{{ simpleQuery() - - /** - * Sends a query to the database server - * - * @param string the SQL query string - * - * @return mixed + a PHP result resrouce for successful SELECT queries - * + the DB_OK constant for other successful queries - * + a DB_Error object on failure - */ - function simpleQuery($query) - { - $ismanip = DB::isManip($query); - $this->last_query = $query; - $query = $this->modifyQuery($query); - if ($this->_db) { - if (!@mysqli_select_db($this->connection, $this->_db)) { - return $this->mysqliRaiseError(DB_ERROR_NODBSELECTED); - } - } - if (!$this->autocommit && $ismanip) { - if ($this->transaction_opcount == 0) { - $result = @mysqli_query($this->connection, 'SET AUTOCOMMIT=0'); - $result = @mysqli_query($this->connection, 'BEGIN'); - if (!$result) { - return $this->mysqliRaiseError(); - } - } - $this->transaction_opcount++; - } - $result = @mysqli_query($this->connection, $query); - if (!$result) { - return $this->mysqliRaiseError(); - } - if (is_object($result)) { - return $result; - } - return DB_OK; - } - - // }}} - // {{{ nextResult() - - /** - * Move the internal mysql result pointer to the next available result. - * - * This method has not been implemented yet. - * - * @param resource $result a valid sql result resource - * @return false - * @access public - */ - function nextResult($result) - { - return false; - } - - // }}} - // {{{ fetchInto() - - /** - * Places a row from the result set into the given array - * - * Formating of the array and the data therein are configurable. - * See DB_result::fetchInto() for more information. - * - * This method is not meant to be called directly. Use - * DB_result::fetchInto() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result the query result resource - * @param array $arr the referenced array to put the data in - * @param int $fetchmode how the resulting array should be indexed - * @param int $rownum the row number to fetch (0 = first row) - * - * @return mixed DB_OK on success, NULL when the end of a result set is - * reached or on failure - * - * @see DB_result::fetchInto() - */ - function fetchInto($result, &$arr, $fetchmode, $rownum = null) - { - if ($rownum !== null) { - if (!@mysqli_data_seek($result, $rownum)) { - return null; - } - } - if ($fetchmode & DB_FETCHMODE_ASSOC) { - $arr = @mysqli_fetch_array($result, MYSQLI_ASSOC); - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE && $arr) { - $arr = array_change_key_case($arr, CASE_LOWER); - } - } else { - $arr = @mysqli_fetch_row($result); - } - if (!$arr) { - return null; - } - if ($this->options['portability'] & DB_PORTABILITY_RTRIM) { - /* - * Even though this DBMS already trims output, we do this because - * a field might have intentional whitespace at the end that - * gets removed by DB_PORTABILITY_RTRIM under another driver. - */ - $this->_rtrimArrayValues($arr); - } - if ($this->options['portability'] & DB_PORTABILITY_NULL_TO_EMPTY) { - $this->_convertNullArrayValuesToEmpty($arr); - } - return DB_OK; - } - - // }}} - // {{{ freeResult() - - /** - * Deletes the result set and frees the memory occupied by the result set - * - * This method is not meant to be called directly. Use - * DB_result::free() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return bool TRUE on success, FALSE if $result is invalid - * - * @see DB_result::free() - */ - function freeResult($result) - { - return @mysqli_free_result($result); - } - - // }}} - // {{{ numCols() - - /** - * Gets the number of columns in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numCols() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of columns. A DB_Error object on failure. - * - * @see DB_result::numCols() - */ - function numCols($result) - { - $cols = @mysqli_num_fields($result); - if (!$cols) { - return $this->mysqliRaiseError(); - } - return $cols; - } - - // }}} - // {{{ numRows() - - /** - * Gets the number of rows in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numRows() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of rows. A DB_Error object on failure. - * - * @see DB_result::numRows() - */ - function numRows($result) - { - $rows = @mysqli_num_rows($result); - if ($rows === null) { - return $this->mysqliRaiseError(); - } - return $rows; - } - - // }}} - // {{{ autoCommit() - - /** - * Enables or disables automatic commits - * - * @param bool $onoff true turns it on, false turns it off - * - * @return int DB_OK on success. A DB_Error object if the driver - * doesn't support auto-committing transactions. - */ - function autoCommit($onoff = false) - { - // XXX if $this->transaction_opcount > 0, we should probably - // issue a warning here. - $this->autocommit = $onoff ? true : false; - return DB_OK; - } - - // }}} - // {{{ commit() - - /** - * Commits the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function commit() - { - if ($this->transaction_opcount > 0) { - if ($this->_db) { - if (!@mysqli_select_db($this->connection, $this->_db)) { - return $this->mysqliRaiseError(DB_ERROR_NODBSELECTED); - } - } - $result = @mysqli_query($this->connection, 'COMMIT'); - $result = @mysqli_query($this->connection, 'SET AUTOCOMMIT=1'); - $this->transaction_opcount = 0; - if (!$result) { - return $this->mysqliRaiseError(); - } - } - return DB_OK; - } - - // }}} - // {{{ rollback() - - /** - * Reverts the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function rollback() - { - if ($this->transaction_opcount > 0) { - if ($this->_db) { - if (!@mysqli_select_db($this->connection, $this->_db)) { - return $this->mysqliRaiseError(DB_ERROR_NODBSELECTED); - } - } - $result = @mysqli_query($this->connection, 'ROLLBACK'); - $result = @mysqli_query($this->connection, 'SET AUTOCOMMIT=1'); - $this->transaction_opcount = 0; - if (!$result) { - return $this->mysqliRaiseError(); - } - } - return DB_OK; - } - - // }}} - // {{{ affectedRows() - - /** - * Determines the number of rows affected by a data maniuplation query - * - * 0 is returned for queries that don't manipulate data. - * - * @return int the number of rows. A DB_Error object on failure. - */ - function affectedRows() - { - if (DB::isManip($this->last_query)) { - return @mysqli_affected_rows($this->connection); - } else { - return 0; - } - } - - // }}} - // {{{ nextId() - - /** - * Returns the next free id in a sequence - * - * @param string $seq_name name of the sequence - * @param boolean $ondemand when true, the seqence is automatically - * created if it does not exist - * - * @return int the next id number in the sequence. - * A DB_Error object on failure. - * - * @see DB_common::nextID(), DB_common::getSequenceName(), - * DB_mysqli::createSequence(), DB_mysqli::dropSequence() - */ - function nextId($seq_name, $ondemand = true) - { - $seqname = $this->getSequenceName($seq_name); - do { - $repeat = 0; - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $result = $this->query('UPDATE ' . $seqname - . ' SET id = LAST_INSERT_ID(id + 1)'); - $this->popErrorHandling(); - if ($result === DB_OK) { - // COMMON CASE - $id = @mysqli_insert_id($this->connection); - if ($id != 0) { - return $id; - } - - // EMPTY SEQ TABLE - // Sequence table must be empty for some reason, - // so fill it and return 1 - // Obtain a user-level lock - $result = $this->getOne('SELECT GET_LOCK(' - . "'${seqname}_lock', 10)"); - if (DB::isError($result)) { - return $this->raiseError($result); - } - if ($result == 0) { - return $this->mysqliRaiseError(DB_ERROR_NOT_LOCKED); - } - - // add the default value - $result = $this->query('REPLACE INTO ' . $seqname - . ' (id) VALUES (0)'); - if (DB::isError($result)) { - return $this->raiseError($result); - } - - // Release the lock - $result = $this->getOne('SELECT RELEASE_LOCK(' - . "'${seqname}_lock')"); - if (DB::isError($result)) { - return $this->raiseError($result); - } - // We know what the result will be, so no need to try again - return 1; - - } elseif ($ondemand && DB::isError($result) && - $result->getCode() == DB_ERROR_NOSUCHTABLE) - { - // ONDEMAND TABLE CREATION - $result = $this->createSequence($seq_name); - - // Since createSequence initializes the ID to be 1, - // we do not need to retrieve the ID again (or we will get 2) - if (DB::isError($result)) { - return $this->raiseError($result); - } else { - // First ID of a newly created sequence is 1 - return 1; - } - - } elseif (DB::isError($result) && - $result->getCode() == DB_ERROR_ALREADY_EXISTS) - { - // BACKWARDS COMPAT - // see _BCsequence() comment - $result = $this->_BCsequence($seqname); - if (DB::isError($result)) { - return $this->raiseError($result); - } - $repeat = 1; - } - } while ($repeat); - - return $this->raiseError($result); - } - - /** - * Creates a new sequence - * - * @param string $seq_name name of the new sequence - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::createSequence(), DB_common::getSequenceName(), - * DB_mysqli::nextID(), DB_mysqli::dropSequence() - */ - function createSequence($seq_name) - { - $seqname = $this->getSequenceName($seq_name); - $res = $this->query('CREATE TABLE ' . $seqname - . ' (id INTEGER UNSIGNED AUTO_INCREMENT NOT NULL,' - . ' PRIMARY KEY(id))'); - if (DB::isError($res)) { - return $res; - } - // insert yields value 1, nextId call will generate ID 2 - return $this->query("INSERT INTO ${seqname} (id) VALUES (0)"); - } - - // }}} - // {{{ dropSequence() - - /** - * Deletes a sequence - * - * @param string $seq_name name of the sequence to be deleted - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::dropSequence(), DB_common::getSequenceName(), - * DB_mysql::nextID(), DB_mysql::createSequence() - */ - function dropSequence($seq_name) - { - return $this->query('DROP TABLE ' . $this->getSequenceName($seq_name)); - } - - // }}} - // {{{ _BCsequence() - - /** - * Backwards compatibility with old sequence emulation implementation - * (clean up the dupes) - * - * @param string $seqname the sequence name to clean up - * - * @return bool true on success. A DB_Error object on failure. - * - * @access private - */ - function _BCsequence($seqname) - { - // Obtain a user-level lock... this will release any previous - // application locks, but unlike LOCK TABLES, it does not abort - // the current transaction and is much less frequently used. - $result = $this->getOne("SELECT GET_LOCK('${seqname}_lock',10)"); - if (DB::isError($result)) { - return $result; - } - if ($result == 0) { - // Failed to get the lock, can't do the conversion, bail - // with a DB_ERROR_NOT_LOCKED error - return $this->mysqliRaiseError(DB_ERROR_NOT_LOCKED); - } - - $highest_id = $this->getOne("SELECT MAX(id) FROM ${seqname}"); - if (DB::isError($highest_id)) { - return $highest_id; - } - - // This should kill all rows except the highest - // We should probably do something if $highest_id isn't - // numeric, but I'm at a loss as how to handle that... - $result = $this->query('DELETE FROM ' . $seqname - . " WHERE id <> $highest_id"); - if (DB::isError($result)) { - return $result; - } - - // If another thread has been waiting for this lock, - // it will go thru the above procedure, but will have no - // real effect - $result = $this->getOne("SELECT RELEASE_LOCK('${seqname}_lock')"); - if (DB::isError($result)) { - return $result; - } - return true; - } - - // }}} - // {{{ quoteIdentifier() - - /** - * Quotes a string so it can be safely used as a table or column name - * - * MySQL can't handle the backtick character (`) in - * table or column names. - * - * @param string $str identifier name to be quoted - * - * @return string quoted identifier string - * - * @see DB_common::quoteIdentifier() - * @since Method available since Release 1.6.0 - */ - function quoteIdentifier($str) - { - return '`' . $str . '`'; - } - - // }}} - // {{{ escapeSimple() - - /** - * Escapes a string according to the current DBMS's standards - * - * @param string $str the string to be escaped - * - * @return string the escaped string - * - * @see DB_common::quoteSmart() - * @since Method available since Release 1.6.0 - */ - function escapeSimple($str) - { - return @mysqli_real_escape_string($this->connection, $str); - } - - // }}} - // {{{ modifyLimitQuery() - - /** - * Adds LIMIT clauses to a query string according to current DBMS standards - * - * @param string $query the query to modify - * @param int $from the row to start to fetching (0 = the first row) - * @param int $count the numbers of rows to fetch - * @param mixed $params array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 placeholder for non-array - * parameters or 1 placeholder per array element. - * - * @return string the query string with LIMIT clauses added - * - * @access protected - */ - function modifyLimitQuery($query, $from, $count, $params = array()) - { - if (DB::isManip($query)) { - return $query . " LIMIT $count"; - } else { - return $query . " LIMIT $from, $count"; - } - } - - // }}} - // {{{ mysqliRaiseError() - - /** - * Produces a DB_Error object regarding the current problem - * - * @param int $errno if the error is being manually raised pass a - * DB_ERROR* constant here. If this isn't passed - * the error information gathered from the DBMS. - * - * @return object the DB_Error object - * - * @see DB_common::raiseError(), - * DB_mysqli::errorNative(), DB_common::errorCode() - */ - function mysqliRaiseError($errno = null) - { - if ($errno === null) { - if ($this->options['portability'] & DB_PORTABILITY_ERRORS) { - $this->errorcode_map[1022] = DB_ERROR_CONSTRAINT; - $this->errorcode_map[1048] = DB_ERROR_CONSTRAINT_NOT_NULL; - $this->errorcode_map[1062] = DB_ERROR_CONSTRAINT; - } else { - // Doing this in case mode changes during runtime. - $this->errorcode_map[1022] = DB_ERROR_ALREADY_EXISTS; - $this->errorcode_map[1048] = DB_ERROR_CONSTRAINT; - $this->errorcode_map[1062] = DB_ERROR_ALREADY_EXISTS; - } - $errno = $this->errorCode(mysqli_errno($this->connection)); - } - return $this->raiseError($errno, null, null, null, - @mysqli_errno($this->connection) . ' ** ' . - @mysqli_error($this->connection)); - } - - // }}} - // {{{ errorNative() - - /** - * Gets the DBMS' native error code produced by the last query - * - * @return int the DBMS' error code - */ - function errorNative() - { - return @mysqli_errno($this->connection); - } - - // }}} - // {{{ tableInfo() - - /** - * Returns information about a table or a result set - * - * @param object|string $result DB_result object from a query or a - * string containing the name of a table. - * While this also accepts a query result - * resource identifier, this behavior is - * deprecated. - * @param int $mode a valid tableInfo mode - * - * @return array an associative array with the information requested. - * A DB_Error object on failure. - * - * @see DB_common::setOption() - */ - function tableInfo($result, $mode = null) - { - if (is_string($result)) { - /* - * Probably received a table name. - * Create a result resource identifier. - */ - $id = @mysqli_query($this->connection, - "SELECT * FROM $result LIMIT 0"); - $got_string = true; - } elseif (isset($result->result)) { - /* - * Probably received a result object. - * Extract the result resource identifier. - */ - $id = $result->result; - $got_string = false; - } else { - /* - * Probably received a result resource identifier. - * Copy it. - * Deprecated. Here for compatibility only. - */ - $id = $result; - $got_string = false; - } - - if (!is_a($id, 'mysqli_result')) { - return $this->mysqliRaiseError(DB_ERROR_NEED_MORE_DATA); - } - - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) { - $case_func = 'strtolower'; - } else { - $case_func = 'strval'; - } - - $count = @mysqli_num_fields($id); - $res = array(); - - if ($mode) { - $res['num_fields'] = $count; - } - - for ($i = 0; $i < $count; $i++) { - $tmp = @mysqli_fetch_field($id); - - $flags = ''; - foreach ($this->mysqli_flags as $const => $means) { - if ($tmp->flags & $const) { - $flags .= $means . ' '; - } - } - if ($tmp->def) { - $flags .= 'default_' . rawurlencode($tmp->def); - } - $flags = trim($flags); - - $res[$i] = array( - 'table' => $case_func($tmp->table), - 'name' => $case_func($tmp->name), - 'type' => isset($this->mysqli_types[$tmp->type]) - ? $this->mysqli_types[$tmp->type] - : 'unknown', - 'len' => $tmp->max_length, - 'flags' => $flags, - ); - - if ($mode & DB_TABLEINFO_ORDER) { - $res['order'][$res[$i]['name']] = $i; - } - if ($mode & DB_TABLEINFO_ORDERTABLE) { - $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i; - } - } - - // free the result only if we were called on a table - if ($got_string) { - @mysqli_free_result($id); - } - return $res; - } - - // }}} - // {{{ getSpecialQuery() - - /** - * Obtains the query string needed for listing a given type of objects - * - * @param string $type the kind of objects you want to retrieve - * - * @return string the SQL query string or null if the driver doesn't - * support the object type requested - * - * @access protected - * @see DB_common::getListOf() - */ - function getSpecialQuery($type) - { - switch ($type) { - case 'tables': - return 'SHOW TABLES'; - case 'users': - return 'SELECT DISTINCT User FROM mysql.user'; - case 'databases': - return 'SHOW DATABASES'; - default: - return null; - } - } - - // }}} - -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ - -?> diff --git a/program/lib/DB/oci8.php b/program/lib/DB/oci8.php deleted file mode 100644 index 116f08b..0000000 --- a/program/lib/DB/oci8.php +++ /dev/null @@ -1,1117 +0,0 @@ - - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: oci8.php 12 2005-10-02 11:36:35Z sparc $ - * @link http://pear.php.net/package/DB - */ - -/** - * Obtain the DB_common class so it can be extended from - */ -require_once 'DB/common.php'; - -/** - * The methods PEAR DB uses to interact with PHP's oci8 extension - * for interacting with Oracle databases - * - * Definitely works with versions 8 and 9 of Oracle. - * - * These methods overload the ones declared in DB_common. - * - * Be aware... OCIError() only appears to return anything when given a - * statement, so functions return the generic DB_ERROR instead of more - * useful errors that have to do with feedback from the database. - * - * @category Database - * @package DB - * @author James L. Pine - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - */ -class DB_oci8 extends DB_common -{ - // {{{ properties - - /** - * The DB driver type (mysql, oci8, odbc, etc.) - * @var string - */ - var $phptype = 'oci8'; - - /** - * The database syntax variant to be used (db2, access, etc.), if any - * @var string - */ - var $dbsyntax = 'oci8'; - - /** - * The capabilities of this DB implementation - * - * The 'new_link' element contains the PHP version that first provided - * new_link support for this DBMS. Contains false if it's unsupported. - * - * Meaning of the 'limit' element: - * + 'emulate' = emulate with fetch row by number - * + 'alter' = alter the query - * + false = skip rows - * - * @var array - */ - var $features = array( - 'limit' => 'alter', - 'new_link' => '5.0.0', - 'numrows' => 'subquery', - 'pconnect' => true, - 'prepare' => true, - 'ssl' => false, - 'transactions' => true, - ); - - /** - * A mapping of native error codes to DB error codes - * @var array - */ - var $errorcode_map = array( - 1 => DB_ERROR_CONSTRAINT, - 900 => DB_ERROR_SYNTAX, - 904 => DB_ERROR_NOSUCHFIELD, - 913 => DB_ERROR_VALUE_COUNT_ON_ROW, - 921 => DB_ERROR_SYNTAX, - 923 => DB_ERROR_SYNTAX, - 942 => DB_ERROR_NOSUCHTABLE, - 955 => DB_ERROR_ALREADY_EXISTS, - 1400 => DB_ERROR_CONSTRAINT_NOT_NULL, - 1401 => DB_ERROR_INVALID, - 1407 => DB_ERROR_CONSTRAINT_NOT_NULL, - 1418 => DB_ERROR_NOT_FOUND, - 1476 => DB_ERROR_DIVZERO, - 1722 => DB_ERROR_INVALID_NUMBER, - 2289 => DB_ERROR_NOSUCHTABLE, - 2291 => DB_ERROR_CONSTRAINT, - 2292 => DB_ERROR_CONSTRAINT, - 2449 => DB_ERROR_CONSTRAINT, - ); - - /** - * The raw database connection created by PHP - * @var resource - */ - var $connection; - - /** - * The DSN information for connecting to a database - * @var array - */ - var $dsn = array(); - - - /** - * Should data manipulation queries be committed automatically? - * @var bool - * @access private - */ - var $autocommit = true; - - /** - * Stores the $data passed to execute() in the oci8 driver - * - * Gets reset to array() when simpleQuery() is run. - * - * Needed in case user wants to call numRows() after prepare/execute - * was used. - * - * @var array - * @access private - */ - var $_data = array(); - - /** - * The result or statement handle from the most recently executed query - * @var resource - */ - var $last_stmt; - - /** - * Is the given prepared statement a data manipulation query? - * @var array - * @access private - */ - var $manip_query = array(); - - - // }}} - // {{{ constructor - - /** - * This constructor calls $this->DB_common() - * - * @return void - */ - function DB_oci8() - { - $this->DB_common(); - } - - // }}} - // {{{ connect() - - /** - * Connect to the database server, log in and open the database - * - * Don't call this method directly. Use DB::connect() instead. - * - * If PHP is at version 5.0.0 or greater: - * + Generally, oci_connect() or oci_pconnect() are used. - * + But if the new_link DSN option is set to true, oci_new_connect() - * is used. - * - * When using PHP version 4.x, OCILogon() or OCIPLogon() are used. - * - * PEAR DB's oci8 driver supports the following extra DSN options: - * + charset The character set to be used on the connection. - * Only used if PHP is at version 5.0.0 or greater - * and the Oracle server is at 9.2 or greater. - * Available since PEAR DB 1.7.0. - * + new_link If set to true, causes subsequent calls to - * connect() to return a new connection link - * instead of the existing one. WARNING: this is - * not portable to other DBMS's. - * Available since PEAR DB 1.7.0. - * - * @param array $dsn the data source name - * @param bool $persistent should the connection be persistent? - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function connect($dsn, $persistent = false) - { - if (!PEAR::loadExtension('oci8')) { - return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND); - } - - $this->dsn = $dsn; - if ($dsn['dbsyntax']) { - $this->dbsyntax = $dsn['dbsyntax']; - } - - if (function_exists('oci_connect')) { - if (isset($dsn['new_link']) - && ($dsn['new_link'] == 'true' || $dsn['new_link'] === true)) - { - $connect_function = 'oci_new_connect'; - } else { - $connect_function = $persistent ? 'oci_pconnect' - : 'oci_connect'; - } - - // Backwards compatibility with DB < 1.7.0 - if (empty($dsn['database']) && !empty($dsn['hostspec'])) { - $db = $dsn['hostspec']; - } else { - $db = $dsn['database']; - } - - $char = empty($dsn['charset']) ? null : $dsn['charset']; - $this->connection = @$connect_function($dsn['username'], - $dsn['password'], - $db, - $char); - $error = OCIError(); - if (!empty($error) && $error['code'] == 12541) { - // Couldn't find TNS listener. Try direct connection. - $this->connection = @$connect_function($dsn['username'], - $dsn['password'], - null, - $char); - } - } else { - $connect_function = $persistent ? 'OCIPLogon' : 'OCILogon'; - if ($dsn['hostspec']) { - $this->connection = @$connect_function($dsn['username'], - $dsn['password'], - $dsn['hostspec']); - } elseif ($dsn['username'] || $dsn['password']) { - $this->connection = @$connect_function($dsn['username'], - $dsn['password']); - } - } - - if (!$this->connection) { - $error = OCIError(); - $error = (is_array($error)) ? $error['message'] : null; - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - $error); - } - return DB_OK; - } - - // }}} - // {{{ disconnect() - - /** - * Disconnects from the database server - * - * @return bool TRUE on success, FALSE on failure - */ - function disconnect() - { - if (function_exists('oci_close')) { - $ret = @oci_close($this->connection); - } else { - $ret = @OCILogOff($this->connection); - } - $this->connection = null; - return $ret; - } - - // }}} - // {{{ simpleQuery() - - /** - * Sends a query to the database server - * - * To determine how many rows of a result set get buffered using - * ocisetprefetch(), see the "result_buffering" option in setOptions(). - * This option was added in Release 1.7.0. - * - * @param string the SQL query string - * - * @return mixed + a PHP result resrouce for successful SELECT queries - * + the DB_OK constant for other successful queries - * + a DB_Error object on failure - */ - function simpleQuery($query) - { - $this->_data = array(); - $this->last_parameters = array(); - $this->last_query = $query; - $query = $this->modifyQuery($query); - $result = @OCIParse($this->connection, $query); - if (!$result) { - return $this->oci8RaiseError(); - } - if ($this->autocommit) { - $success = @OCIExecute($result,OCI_COMMIT_ON_SUCCESS); - } else { - $success = @OCIExecute($result,OCI_DEFAULT); - } - if (!$success) { - return $this->oci8RaiseError($result); - } - $this->last_stmt = $result; - if (DB::isManip($query)) { - return DB_OK; - } else { - @ocisetprefetch($result, $this->options['result_buffering']); - return $result; - } - } - - // }}} - // {{{ nextResult() - - /** - * Move the internal oracle result pointer to the next available result - * - * @param a valid oci8 result resource - * - * @access public - * - * @return true if a result is available otherwise return false - */ - function nextResult($result) - { - return false; - } - - // }}} - // {{{ fetchInto() - - /** - * Places a row from the result set into the given array - * - * Formating of the array and the data therein are configurable. - * See DB_result::fetchInto() for more information. - * - * This method is not meant to be called directly. Use - * DB_result::fetchInto() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result the query result resource - * @param array $arr the referenced array to put the data in - * @param int $fetchmode how the resulting array should be indexed - * @param int $rownum the row number to fetch (0 = first row) - * - * @return mixed DB_OK on success, NULL when the end of a result set is - * reached or on failure - * - * @see DB_result::fetchInto() - */ - function fetchInto($result, &$arr, $fetchmode, $rownum = null) - { - if ($rownum !== null) { - return $this->raiseError(DB_ERROR_NOT_CAPABLE); - } - if ($fetchmode & DB_FETCHMODE_ASSOC) { - $moredata = @OCIFetchInto($result,$arr,OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS); - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE && - $moredata) - { - $arr = array_change_key_case($arr, CASE_LOWER); - } - } else { - $moredata = OCIFetchInto($result,$arr,OCI_RETURN_NULLS+OCI_RETURN_LOBS); - } - if (!$moredata) { - return null; - } - if ($this->options['portability'] & DB_PORTABILITY_RTRIM) { - $this->_rtrimArrayValues($arr); - } - if ($this->options['portability'] & DB_PORTABILITY_NULL_TO_EMPTY) { - $this->_convertNullArrayValuesToEmpty($arr); - } - return DB_OK; - } - - // }}} - // {{{ freeResult() - - /** - * Deletes the result set and frees the memory occupied by the result set - * - * This method is not meant to be called directly. Use - * DB_result::free() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return bool TRUE on success, FALSE if $result is invalid - * - * @see DB_result::free() - */ - function freeResult($result) - { - return @OCIFreeStatement($result); - } - - /** - * Frees the internal resources associated with a prepared query - * - * @param resource $stmt the prepared statement's resource - * @param bool $free_resource should the PHP resource be freed too? - * Use false if you need to get data - * from the result set later. - * - * @return bool TRUE on success, FALSE if $result is invalid - * - * @see DB_oci8::prepare() - */ - function freePrepared($stmt, $free_resource = true) - { - if (!is_resource($stmt)) { - return false; - } - if ($free_resource) { - @ocifreestatement($stmt); - } - if (isset($this->prepare_types[(int)$stmt])) { - unset($this->prepare_types[(int)$stmt]); - unset($this->manip_query[(int)$stmt]); - } else { - return false; - } - return true; - } - - // }}} - // {{{ numRows() - - /** - * Gets the number of rows in a result set - * - * Only works if the DB_PORTABILITY_NUMROWS portability option - * is turned on. - * - * This method is not meant to be called directly. Use - * DB_result::numRows() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of rows. A DB_Error object on failure. - * - * @see DB_result::numRows(), DB_common::setOption() - */ - function numRows($result) - { - // emulate numRows for Oracle. yuck. - if ($this->options['portability'] & DB_PORTABILITY_NUMROWS && - $result === $this->last_stmt) - { - $countquery = 'SELECT COUNT(*) FROM ('.$this->last_query.')'; - $save_query = $this->last_query; - $save_stmt = $this->last_stmt; - - if (count($this->_data)) { - $smt = $this->prepare('SELECT COUNT(*) FROM ('.$this->last_query.')'); - $count = $this->execute($smt, $this->_data); - } else { - $count =& $this->query($countquery); - } - - if (DB::isError($count) || - DB::isError($row = $count->fetchRow(DB_FETCHMODE_ORDERED))) - { - $this->last_query = $save_query; - $this->last_stmt = $save_stmt; - return $this->raiseError(DB_ERROR_NOT_CAPABLE); - } - return $row[0]; - } - return $this->raiseError(DB_ERROR_NOT_CAPABLE); - } - - // }}} - // {{{ numCols() - - /** - * Gets the number of columns in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numCols() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of columns. A DB_Error object on failure. - * - * @see DB_result::numCols() - */ - function numCols($result) - { - $cols = @OCINumCols($result); - if (!$cols) { - return $this->oci8RaiseError($result); - } - return $cols; - } - - // }}} - // {{{ prepare() - - /** - * Prepares a query for multiple execution with execute(). - * - * With oci8, this is emulated. - * - * prepare() requires a generic query as string like - * INSERT INTO numbers VALUES (?, ?, ?) - * . The ? characters are placeholders. - * - * Three types of placeholders can be used: - * + ? a quoted scalar value, i.e. strings, integers - * + ! value is inserted 'as is' - * + & requires a file name. The file's contents get - * inserted into the query (i.e. saving binary - * data in a db) - * - * Use backslashes to escape placeholder characters if you don't want - * them to be interpreted as placeholders. Example: - * "UPDATE foo SET col=? WHERE col='over \& under'" - * - * - * @param string $query the query to be prepared - * - * @return mixed DB statement resource on success. DB_Error on failure. - * - * @see DB_oci8::execute() - */ - function prepare($query) - { - $tokens = preg_split('/((? $val) { - switch ($val) { - case '?': - $types[$token++] = DB_PARAM_SCALAR; - unset($tokens[$key]); - break; - case '&': - $types[$token++] = DB_PARAM_OPAQUE; - unset($tokens[$key]); - break; - case '!': - $types[$token++] = DB_PARAM_MISC; - unset($tokens[$key]); - break; - default: - $tokens[$key] = preg_replace('/\\\([&?!])/', "\\1", $val); - if ($key != $binds) { - $newquery .= $tokens[$key] . ':bind' . $token; - } else { - $newquery .= $tokens[$key]; - } - } - } - - $this->last_query = $query; - $newquery = $this->modifyQuery($newquery); - if (!$stmt = @OCIParse($this->connection, $newquery)) { - return $this->oci8RaiseError(); - } - $this->prepare_types[(int)$stmt] = $types; - $this->manip_query[(int)$stmt] = DB::isManip($query); - return $stmt; - } - - // }}} - // {{{ execute() - - /** - * Executes a DB statement prepared with prepare(). - * - * To determine how many rows of a result set get buffered using - * ocisetprefetch(), see the "result_buffering" option in setOptions(). - * This option was added in Release 1.7.0. - * - * @param resource $stmt a DB statement resource returned from prepare() - * @param mixed $data array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 for non-array items or the - * quantity of elements in the array. - * - * @return mixed returns an oic8 result resource for successful SELECT - * queries, DB_OK for other successful queries. - * A DB error object is returned on failure. - * - * @see DB_oci8::prepare() - */ - function &execute($stmt, $data = array()) - { - $data = (array)$data; - $this->last_parameters = $data; - $this->_data = $data; - - $types =& $this->prepare_types[(int)$stmt]; - if (count($types) != count($data)) { - $tmp =& $this->raiseError(DB_ERROR_MISMATCH); - return $tmp; - } - - $i = 0; - foreach ($data as $key => $value) { - if ($types[$i] == DB_PARAM_MISC) { - /* - * Oracle doesn't seem to have the ability to pass a - * parameter along unchanged, so strip off quotes from start - * and end, plus turn two single quotes to one single quote, - * in order to avoid the quotes getting escaped by - * Oracle and ending up in the database. - */ - $data[$key] = preg_replace("/^'(.*)'$/", "\\1", $data[$key]); - $data[$key] = str_replace("''", "'", $data[$key]); - } elseif ($types[$i] == DB_PARAM_OPAQUE) { - $fp = @fopen($data[$key], 'rb'); - if (!$fp) { - $tmp =& $this->raiseError(DB_ERROR_ACCESS_VIOLATION); - return $tmp; - } - $data[$key] = fread($fp, filesize($data[$key])); - fclose($fp); - } - if (!@OCIBindByName($stmt, ':bind' . $i, $data[$key], -1)) { - $tmp = $this->oci8RaiseError($stmt); - return $tmp; - } - $i++; - } - if ($this->autocommit) { - $success = @OCIExecute($stmt, OCI_COMMIT_ON_SUCCESS); - } else { - $success = @OCIExecute($stmt, OCI_DEFAULT); - } - if (!$success) { - $tmp = $this->oci8RaiseError($stmt); - return $tmp; - } - $this->last_stmt = $stmt; - if ($this->manip_query[(int)$stmt]) { - $tmp = DB_OK; - } else { - @ocisetprefetch($stmt, $this->options['result_buffering']); - $tmp =& new DB_result($this, $stmt); - } - return $tmp; - } - - // }}} - // {{{ autoCommit() - - /** - * Enables or disables automatic commits - * - * @param bool $onoff true turns it on, false turns it off - * - * @return int DB_OK on success. A DB_Error object if the driver - * doesn't support auto-committing transactions. - */ - function autoCommit($onoff = false) - { - $this->autocommit = (bool)$onoff;; - return DB_OK; - } - - // }}} - // {{{ commit() - - /** - * Commits the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function commit() - { - $result = @OCICommit($this->connection); - if (!$result) { - return $this->oci8RaiseError(); - } - return DB_OK; - } - - // }}} - // {{{ rollback() - - /** - * Reverts the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function rollback() - { - $result = @OCIRollback($this->connection); - if (!$result) { - return $this->oci8RaiseError(); - } - return DB_OK; - } - - // }}} - // {{{ affectedRows() - - /** - * Determines the number of rows affected by a data maniuplation query - * - * 0 is returned for queries that don't manipulate data. - * - * @return int the number of rows. A DB_Error object on failure. - */ - function affectedRows() - { - if ($this->last_stmt === false) { - return $this->oci8RaiseError(); - } - $result = @OCIRowCount($this->last_stmt); - if ($result === false) { - return $this->oci8RaiseError($this->last_stmt); - } - return $result; - } - - // }}} - // {{{ modifyQuery() - - /** - * Changes a query string for various DBMS specific reasons - * - * "SELECT 2+2" must be "SELECT 2+2 FROM dual" in Oracle. - * - * @param string $query the query string to modify - * - * @return string the modified query string - * - * @access protected - */ - function modifyQuery($query) - { - if (preg_match('/^\s*SELECT/i', $query) && - !preg_match('/\sFROM\s/i', $query)) { - $query .= ' FROM dual'; - } - return $query; - } - - // }}} - // {{{ modifyLimitQuery() - - /** - * Adds LIMIT clauses to a query string according to current DBMS standards - * - * @param string $query the query to modify - * @param int $from the row to start to fetching (0 = the first row) - * @param int $count the numbers of rows to fetch - * @param mixed $params array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 placeholder for non-array - * parameters or 1 placeholder per array element. - * - * @return string the query string with LIMIT clauses added - * - * @access protected - */ - function modifyLimitQuery($query, $from, $count, $params = array()) - { - // Let Oracle return the name of the columns instead of - // coding a "home" SQL parser - - if (count($params)) { - $result = $this->prepare("SELECT * FROM ($query) " - . 'WHERE NULL = NULL'); - $tmp =& $this->execute($result, $params); - } else { - $q_fields = "SELECT * FROM ($query) WHERE NULL = NULL"; - - if (!$result = @OCIParse($this->connection, $q_fields)) { - $this->last_query = $q_fields; - return $this->oci8RaiseError(); - } - if (!@OCIExecute($result, OCI_DEFAULT)) { - $this->last_query = $q_fields; - return $this->oci8RaiseError($result); - } - } - - $ncols = OCINumCols($result); - $cols = array(); - for ( $i = 1; $i <= $ncols; $i++ ) { - $cols[] = '"' . OCIColumnName($result, $i) . '"'; - } - $fields = implode(', ', $cols); - // XXX Test that (tip by John Lim) - //if (preg_match('/^\s*SELECT\s+/is', $query, $match)) { - // // Introduce the FIRST_ROWS Oracle query optimizer - // $query = substr($query, strlen($match[0]), strlen($query)); - // $query = "SELECT /* +FIRST_ROWS */ " . $query; - //} - - // Construct the query - // more at: http://marc.theaimsgroup.com/?l=php-db&m=99831958101212&w=2 - // Perhaps this could be optimized with the use of Unions - $query = "SELECT $fields FROM". - " (SELECT rownum as linenum, $fields FROM". - " ($query)". - ' WHERE rownum <= '. ($from + $count) . - ') WHERE linenum >= ' . ++$from; - return $query; - } - - // }}} - // {{{ nextId() - - /** - * Returns the next free id in a sequence - * - * @param string $seq_name name of the sequence - * @param boolean $ondemand when true, the seqence is automatically - * created if it does not exist - * - * @return int the next id number in the sequence. - * A DB_Error object on failure. - * - * @see DB_common::nextID(), DB_common::getSequenceName(), - * DB_oci8::createSequence(), DB_oci8::dropSequence() - */ - function nextId($seq_name, $ondemand = true) - { - $seqname = $this->getSequenceName($seq_name); - $repeat = 0; - do { - $this->expectError(DB_ERROR_NOSUCHTABLE); - $result =& $this->query("SELECT ${seqname}.nextval FROM dual"); - $this->popExpect(); - if ($ondemand && DB::isError($result) && - $result->getCode() == DB_ERROR_NOSUCHTABLE) { - $repeat = 1; - $result = $this->createSequence($seq_name); - if (DB::isError($result)) { - return $this->raiseError($result); - } - } else { - $repeat = 0; - } - } while ($repeat); - if (DB::isError($result)) { - return $this->raiseError($result); - } - $arr = $result->fetchRow(DB_FETCHMODE_ORDERED); - return $arr[0]; - } - - /** - * Creates a new sequence - * - * @param string $seq_name name of the new sequence - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::createSequence(), DB_common::getSequenceName(), - * DB_oci8::nextID(), DB_oci8::dropSequence() - */ - function createSequence($seq_name) - { - return $this->query('CREATE SEQUENCE ' - . $this->getSequenceName($seq_name)); - } - - // }}} - // {{{ dropSequence() - - /** - * Deletes a sequence - * - * @param string $seq_name name of the sequence to be deleted - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::dropSequence(), DB_common::getSequenceName(), - * DB_oci8::nextID(), DB_oci8::createSequence() - */ - function dropSequence($seq_name) - { - return $this->query('DROP SEQUENCE ' - . $this->getSequenceName($seq_name)); - } - - // }}} - // {{{ oci8RaiseError() - - /** - * Produces a DB_Error object regarding the current problem - * - * @param int $errno if the error is being manually raised pass a - * DB_ERROR* constant here. If this isn't passed - * the error information gathered from the DBMS. - * - * @return object the DB_Error object - * - * @see DB_common::raiseError(), - * DB_oci8::errorNative(), DB_oci8::errorCode() - */ - function oci8RaiseError($errno = null) - { - if ($errno === null) { - $error = @OCIError($this->connection); - return $this->raiseError($this->errorCode($error['code']), - null, null, null, $error['message']); - } elseif (is_resource($errno)) { - $error = @OCIError($errno); - return $this->raiseError($this->errorCode($error['code']), - null, null, null, $error['message']); - } - return $this->raiseError($this->errorCode($errno)); - } - - // }}} - // {{{ errorNative() - - /** - * Gets the DBMS' native error code produced by the last query - * - * @return int the DBMS' error code. FALSE if the code could not be - * determined - */ - function errorNative() - { - if (is_resource($this->last_stmt)) { - $error = @OCIError($this->last_stmt); - } else { - $error = @OCIError($this->connection); - } - if (is_array($error)) { - return $error['code']; - } - return false; - } - - // }}} - // {{{ tableInfo() - - /** - * Returns information about a table or a result set - * - * NOTE: only supports 'table' and 'flags' if $result - * is a table name. - * - * NOTE: flags won't contain index information. - * - * @param object|string $result DB_result object from a query or a - * string containing the name of a table. - * While this also accepts a query result - * resource identifier, this behavior is - * deprecated. - * @param int $mode a valid tableInfo mode - * - * @return array an associative array with the information requested. - * A DB_Error object on failure. - * - * @see DB_common::tableInfo() - */ - function tableInfo($result, $mode = null) - { - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) { - $case_func = 'strtolower'; - } else { - $case_func = 'strval'; - } - - $res = array(); - - if (is_string($result)) { - /* - * Probably received a table name. - * Create a result resource identifier. - */ - $result = strtoupper($result); - $q_fields = 'SELECT column_name, data_type, data_length, ' - . 'nullable ' - . 'FROM user_tab_columns ' - . "WHERE table_name='$result' ORDER BY column_id"; - - $this->last_query = $q_fields; - - if (!$stmt = @OCIParse($this->connection, $q_fields)) { - return $this->oci8RaiseError(DB_ERROR_NEED_MORE_DATA); - } - if (!@OCIExecute($stmt, OCI_DEFAULT)) { - return $this->oci8RaiseError($stmt); - } - - $i = 0; - while (@OCIFetch($stmt)) { - $res[$i] = array( - 'table' => $case_func($result), - 'name' => $case_func(@OCIResult($stmt, 1)), - 'type' => @OCIResult($stmt, 2), - 'len' => @OCIResult($stmt, 3), - 'flags' => (@OCIResult($stmt, 4) == 'N') ? 'not_null' : '', - ); - if ($mode & DB_TABLEINFO_ORDER) { - $res['order'][$res[$i]['name']] = $i; - } - if ($mode & DB_TABLEINFO_ORDERTABLE) { - $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i; - } - $i++; - } - - if ($mode) { - $res['num_fields'] = $i; - } - @OCIFreeStatement($stmt); - - } else { - if (isset($result->result)) { - /* - * Probably received a result object. - * Extract the result resource identifier. - */ - $result = $result->result; - } - - $res = array(); - - if ($result === $this->last_stmt) { - $count = @OCINumCols($result); - if ($mode) { - $res['num_fields'] = $count; - } - for ($i = 0; $i < $count; $i++) { - $res[$i] = array( - 'table' => '', - 'name' => $case_func(@OCIColumnName($result, $i+1)), - 'type' => @OCIColumnType($result, $i+1), - 'len' => @OCIColumnSize($result, $i+1), - 'flags' => '', - ); - if ($mode & DB_TABLEINFO_ORDER) { - $res['order'][$res[$i]['name']] = $i; - } - if ($mode & DB_TABLEINFO_ORDERTABLE) { - $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i; - } - } - } else { - return $this->raiseError(DB_ERROR_NOT_CAPABLE); - } - } - return $res; - } - - // }}} - // {{{ getSpecialQuery() - - /** - * Obtains the query string needed for listing a given type of objects - * - * @param string $type the kind of objects you want to retrieve - * - * @return string the SQL query string or null if the driver doesn't - * support the object type requested - * - * @access protected - * @see DB_common::getListOf() - */ - function getSpecialQuery($type) - { - switch ($type) { - case 'tables': - return 'SELECT table_name FROM user_tables'; - case 'synonyms': - return 'SELECT synonym_name FROM user_synonyms'; - default: - return null; - } - } - - // }}} - -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ - -?> diff --git a/program/lib/DB/odbc.php b/program/lib/DB/odbc.php deleted file mode 100644 index e4d6037..0000000 --- a/program/lib/DB/odbc.php +++ /dev/null @@ -1,883 +0,0 @@ - - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: odbc.php 12 2005-10-02 11:36:35Z sparc $ - * @link http://pear.php.net/package/DB - */ - -/** - * Obtain the DB_common class so it can be extended from - */ -require_once 'DB/common.php'; - -/** - * The methods PEAR DB uses to interact with PHP's odbc extension - * for interacting with databases via ODBC connections - * - * These methods overload the ones declared in DB_common. - * - * More info on ODBC errors could be found here: - * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_err_odbc_5stz.asp - * - * @category Database - * @package DB - * @author Stig Bakken - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - */ -class DB_odbc extends DB_common -{ - // {{{ properties - - /** - * The DB driver type (mysql, oci8, odbc, etc.) - * @var string - */ - var $phptype = 'odbc'; - - /** - * The database syntax variant to be used (db2, access, etc.), if any - * @var string - */ - var $dbsyntax = 'sql92'; - - /** - * The capabilities of this DB implementation - * - * The 'new_link' element contains the PHP version that first provided - * new_link support for this DBMS. Contains false if it's unsupported. - * - * Meaning of the 'limit' element: - * + 'emulate' = emulate with fetch row by number - * + 'alter' = alter the query - * + false = skip rows - * - * NOTE: The feature set of the following drivers are different than - * the default: - * + solid: 'transactions' = true - * + navision: 'limit' = false - * - * @var array - */ - var $features = array( - 'limit' => 'emulate', - 'new_link' => false, - 'numrows' => true, - 'pconnect' => true, - 'prepare' => false, - 'ssl' => false, - 'transactions' => false, - ); - - /** - * A mapping of native error codes to DB error codes - * @var array - */ - var $errorcode_map = array( - '01004' => DB_ERROR_TRUNCATED, - '07001' => DB_ERROR_MISMATCH, - '21S01' => DB_ERROR_VALUE_COUNT_ON_ROW, - '21S02' => DB_ERROR_MISMATCH, - '22001' => DB_ERROR_INVALID, - '22003' => DB_ERROR_INVALID_NUMBER, - '22005' => DB_ERROR_INVALID_NUMBER, - '22008' => DB_ERROR_INVALID_DATE, - '22012' => DB_ERROR_DIVZERO, - '23000' => DB_ERROR_CONSTRAINT, - '23502' => DB_ERROR_CONSTRAINT_NOT_NULL, - '23503' => DB_ERROR_CONSTRAINT, - '23504' => DB_ERROR_CONSTRAINT, - '23505' => DB_ERROR_CONSTRAINT, - '24000' => DB_ERROR_INVALID, - '34000' => DB_ERROR_INVALID, - '37000' => DB_ERROR_SYNTAX, - '42000' => DB_ERROR_SYNTAX, - '42601' => DB_ERROR_SYNTAX, - 'IM001' => DB_ERROR_UNSUPPORTED, - 'S0000' => DB_ERROR_NOSUCHTABLE, - 'S0001' => DB_ERROR_ALREADY_EXISTS, - 'S0002' => DB_ERROR_NOSUCHTABLE, - 'S0011' => DB_ERROR_ALREADY_EXISTS, - 'S0012' => DB_ERROR_NOT_FOUND, - 'S0021' => DB_ERROR_ALREADY_EXISTS, - 'S0022' => DB_ERROR_NOSUCHFIELD, - 'S1009' => DB_ERROR_INVALID, - 'S1090' => DB_ERROR_INVALID, - 'S1C00' => DB_ERROR_NOT_CAPABLE, - ); - - /** - * The raw database connection created by PHP - * @var resource - */ - var $connection; - - /** - * The DSN information for connecting to a database - * @var array - */ - var $dsn = array(); - - - /** - * The number of rows affected by a data manipulation query - * @var integer - * @access private - */ - var $affected = 0; - - - // }}} - // {{{ constructor - - /** - * This constructor calls $this->DB_common() - * - * @return void - */ - function DB_odbc() - { - $this->DB_common(); - } - - // }}} - // {{{ connect() - - /** - * Connect to the database server, log in and open the database - * - * Don't call this method directly. Use DB::connect() instead. - * - * PEAR DB's odbc driver supports the following extra DSN options: - * + cursor The type of cursor to be used for this connection. - * - * @param array $dsn the data source name - * @param bool $persistent should the connection be persistent? - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function connect($dsn, $persistent = false) - { - if (!PEAR::loadExtension('odbc')) { - return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND); - } - - $this->dsn = $dsn; - if ($dsn['dbsyntax']) { - $this->dbsyntax = $dsn['dbsyntax']; - } - switch ($this->dbsyntax) { - case 'access': - case 'db2': - case 'solid': - $this->features['transactions'] = true; - break; - case 'navision': - $this->features['limit'] = false; - } - - /* - * This is hear for backwards compatibility. Should have been using - * 'database' all along, but prior to 1.6.0RC3 'hostspec' was used. - */ - if ($dsn['database']) { - $odbcdsn = $dsn['database']; - } elseif ($dsn['hostspec']) { - $odbcdsn = $dsn['hostspec']; - } else { - $odbcdsn = 'localhost'; - } - - $connect_function = $persistent ? 'odbc_pconnect' : 'odbc_connect'; - - if (empty($dsn['cursor'])) { - $this->connection = @$connect_function($odbcdsn, $dsn['username'], - $dsn['password']); - } else { - $this->connection = @$connect_function($odbcdsn, $dsn['username'], - $dsn['password'], - $dsn['cursor']); - } - - if (!is_resource($this->connection)) { - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - $this->errorNative()); - } - return DB_OK; - } - - // }}} - // {{{ disconnect() - - /** - * Disconnects from the database server - * - * @return bool TRUE on success, FALSE on failure - */ - function disconnect() - { - $err = @odbc_close($this->connection); - $this->connection = null; - return $err; - } - - // }}} - // {{{ simpleQuery() - - /** - * Sends a query to the database server - * - * @param string the SQL query string - * - * @return mixed + a PHP result resrouce for successful SELECT queries - * + the DB_OK constant for other successful queries - * + a DB_Error object on failure - */ - function simpleQuery($query) - { - $this->last_query = $query; - $query = $this->modifyQuery($query); - $result = @odbc_exec($this->connection, $query); - if (!$result) { - return $this->odbcRaiseError(); // XXX ERRORMSG - } - // Determine which queries that should return data, and which - // should return an error code only. - if (DB::isManip($query)) { - $this->affected = $result; // For affectedRows() - return DB_OK; - } - $this->affected = 0; - return $result; - } - - // }}} - // {{{ nextResult() - - /** - * Move the internal odbc result pointer to the next available result - * - * @param a valid fbsql result resource - * - * @access public - * - * @return true if a result is available otherwise return false - */ - function nextResult($result) - { - return @odbc_next_result($result); - } - - // }}} - // {{{ fetchInto() - - /** - * Places a row from the result set into the given array - * - * Formating of the array and the data therein are configurable. - * See DB_result::fetchInto() for more information. - * - * This method is not meant to be called directly. Use - * DB_result::fetchInto() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result the query result resource - * @param array $arr the referenced array to put the data in - * @param int $fetchmode how the resulting array should be indexed - * @param int $rownum the row number to fetch (0 = first row) - * - * @return mixed DB_OK on success, NULL when the end of a result set is - * reached or on failure - * - * @see DB_result::fetchInto() - */ - function fetchInto($result, &$arr, $fetchmode, $rownum = null) - { - $arr = array(); - if ($rownum !== null) { - $rownum++; // ODBC first row is 1 - if (version_compare(phpversion(), '4.2.0', 'ge')) { - $cols = @odbc_fetch_into($result, $arr, $rownum); - } else { - $cols = @odbc_fetch_into($result, $rownum, $arr); - } - } else { - $cols = @odbc_fetch_into($result, $arr); - } - if (!$cols) { - return null; - } - if ($fetchmode !== DB_FETCHMODE_ORDERED) { - for ($i = 0; $i < count($arr); $i++) { - $colName = @odbc_field_name($result, $i+1); - $a[$colName] = $arr[$i]; - } - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) { - $a = array_change_key_case($a, CASE_LOWER); - } - $arr = $a; - } - if ($this->options['portability'] & DB_PORTABILITY_RTRIM) { - $this->_rtrimArrayValues($arr); - } - if ($this->options['portability'] & DB_PORTABILITY_NULL_TO_EMPTY) { - $this->_convertNullArrayValuesToEmpty($arr); - } - return DB_OK; - } - - // }}} - // {{{ freeResult() - - /** - * Deletes the result set and frees the memory occupied by the result set - * - * This method is not meant to be called directly. Use - * DB_result::free() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return bool TRUE on success, FALSE if $result is invalid - * - * @see DB_result::free() - */ - function freeResult($result) - { - return @odbc_free_result($result); - } - - // }}} - // {{{ numCols() - - /** - * Gets the number of columns in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numCols() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of columns. A DB_Error object on failure. - * - * @see DB_result::numCols() - */ - function numCols($result) - { - $cols = @odbc_num_fields($result); - if (!$cols) { - return $this->odbcRaiseError(); - } - return $cols; - } - - // }}} - // {{{ affectedRows() - - /** - * Determines the number of rows affected by a data maniuplation query - * - * 0 is returned for queries that don't manipulate data. - * - * @return int the number of rows. A DB_Error object on failure. - */ - function affectedRows() - { - if (empty($this->affected)) { // In case of SELECT stms - return 0; - } - $nrows = @odbc_num_rows($this->affected); - if ($nrows == -1) { - return $this->odbcRaiseError(); - } - return $nrows; - } - - // }}} - // {{{ numRows() - - /** - * Gets the number of rows in a result set - * - * Not all ODBC drivers support this functionality. If they don't - * a DB_Error object for DB_ERROR_UNSUPPORTED is returned. - * - * This method is not meant to be called directly. Use - * DB_result::numRows() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of rows. A DB_Error object on failure. - * - * @see DB_result::numRows() - */ - function numRows($result) - { - $nrows = @odbc_num_rows($result); - if ($nrows == -1) { - return $this->odbcRaiseError(DB_ERROR_UNSUPPORTED); - } - if ($nrows === false) { - return $this->odbcRaiseError(); - } - return $nrows; - } - - // }}} - // {{{ quoteIdentifier() - - /** - * Quotes a string so it can be safely used as a table or column name - * - * Use 'mssql' as the dbsyntax in the DB DSN only if you've unchecked - * "Use ANSI quoted identifiers" when setting up the ODBC data source. - * - * @param string $str identifier name to be quoted - * - * @return string quoted identifier string - * - * @see DB_common::quoteIdentifier() - * @since Method available since Release 1.6.0 - */ - function quoteIdentifier($str) - { - switch ($this->dsn['dbsyntax']) { - case 'access': - return '[' . $str . ']'; - case 'mssql': - case 'sybase': - return '[' . str_replace(']', ']]', $str) . ']'; - case 'mysql': - case 'mysqli': - return '`' . $str . '`'; - default: - return '"' . str_replace('"', '""', $str) . '"'; - } - } - - // }}} - // {{{ quote() - - /** - * @deprecated Deprecated in release 1.6.0 - * @internal - */ - function quote($str) - { - return $this->quoteSmart($str); - } - - // }}} - // {{{ nextId() - - /** - * Returns the next free id in a sequence - * - * @param string $seq_name name of the sequence - * @param boolean $ondemand when true, the seqence is automatically - * created if it does not exist - * - * @return int the next id number in the sequence. - * A DB_Error object on failure. - * - * @see DB_common::nextID(), DB_common::getSequenceName(), - * DB_odbc::createSequence(), DB_odbc::dropSequence() - */ - function nextId($seq_name, $ondemand = true) - { - $seqname = $this->getSequenceName($seq_name); - $repeat = 0; - do { - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $result = $this->query("update ${seqname} set id = id + 1"); - $this->popErrorHandling(); - if ($ondemand && DB::isError($result) && - $result->getCode() == DB_ERROR_NOSUCHTABLE) { - $repeat = 1; - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $result = $this->createSequence($seq_name); - $this->popErrorHandling(); - if (DB::isError($result)) { - return $this->raiseError($result); - } - $result = $this->query("insert into ${seqname} (id) values(0)"); - } else { - $repeat = 0; - } - } while ($repeat); - - if (DB::isError($result)) { - return $this->raiseError($result); - } - - $result = $this->query("select id from ${seqname}"); - if (DB::isError($result)) { - return $result; - } - - $row = $result->fetchRow(DB_FETCHMODE_ORDERED); - if (DB::isError($row || !$row)) { - return $row; - } - - return $row[0]; - } - - /** - * Creates a new sequence - * - * @param string $seq_name name of the new sequence - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::createSequence(), DB_common::getSequenceName(), - * DB_odbc::nextID(), DB_odbc::dropSequence() - */ - function createSequence($seq_name) - { - return $this->query('CREATE TABLE ' - . $this->getSequenceName($seq_name) - . ' (id integer NOT NULL,' - . ' PRIMARY KEY(id))'); - } - - // }}} - // {{{ dropSequence() - - /** - * Deletes a sequence - * - * @param string $seq_name name of the sequence to be deleted - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::dropSequence(), DB_common::getSequenceName(), - * DB_odbc::nextID(), DB_odbc::createSequence() - */ - function dropSequence($seq_name) - { - return $this->query('DROP TABLE ' . $this->getSequenceName($seq_name)); - } - - // }}} - // {{{ autoCommit() - - /** - * Enables or disables automatic commits - * - * @param bool $onoff true turns it on, false turns it off - * - * @return int DB_OK on success. A DB_Error object if the driver - * doesn't support auto-committing transactions. - */ - function autoCommit($onoff = false) - { - if (!@odbc_autocommit($this->connection, $onoff)) { - return $this->odbcRaiseError(); - } - return DB_OK; - } - - // }}} - // {{{ commit() - - /** - * Commits the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function commit() - { - if (!@odbc_commit($this->connection)) { - return $this->odbcRaiseError(); - } - return DB_OK; - } - - // }}} - // {{{ rollback() - - /** - * Reverts the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function rollback() - { - if (!@odbc_rollback($this->connection)) { - return $this->odbcRaiseError(); - } - return DB_OK; - } - - // }}} - // {{{ odbcRaiseError() - - /** - * Produces a DB_Error object regarding the current problem - * - * @param int $errno if the error is being manually raised pass a - * DB_ERROR* constant here. If this isn't passed - * the error information gathered from the DBMS. - * - * @return object the DB_Error object - * - * @see DB_common::raiseError(), - * DB_odbc::errorNative(), DB_common::errorCode() - */ - function odbcRaiseError($errno = null) - { - if ($errno === null) { - switch ($this->dbsyntax) { - case 'access': - if ($this->options['portability'] & DB_PORTABILITY_ERRORS) { - $this->errorcode_map['07001'] = DB_ERROR_NOSUCHFIELD; - } else { - // Doing this in case mode changes during runtime. - $this->errorcode_map['07001'] = DB_ERROR_MISMATCH; - } - - $native_code = odbc_error($this->connection); - - // S1000 is for "General Error." Let's be more specific. - if ($native_code == 'S1000') { - $errormsg = odbc_errormsg($this->connection); - static $error_regexps; - if (!isset($error_regexps)) { - $error_regexps = array( - '/includes related records.$/i' => DB_ERROR_CONSTRAINT, - '/cannot contain a Null value/i' => DB_ERROR_CONSTRAINT_NOT_NULL, - ); - } - foreach ($error_regexps as $regexp => $code) { - if (preg_match($regexp, $errormsg)) { - return $this->raiseError($code, - null, null, null, - $native_code . ' ' . $errormsg); - } - } - $errno = DB_ERROR; - } else { - $errno = $this->errorCode($native_code); - } - break; - default: - $errno = $this->errorCode(odbc_error($this->connection)); - } - } - return $this->raiseError($errno, null, null, null, - $this->errorNative()); - } - - // }}} - // {{{ errorNative() - - /** - * Gets the DBMS' native error code and message produced by the last query - * - * @return string the DBMS' error code and message - */ - function errorNative() - { - if (!is_resource($this->connection)) { - return @odbc_error() . ' ' . @odbc_errormsg(); - } - return @odbc_error($this->connection) . ' ' . @odbc_errormsg($this->connection); - } - - // }}} - // {{{ tableInfo() - - /** - * Returns information about a table or a result set - * - * @param object|string $result DB_result object from a query or a - * string containing the name of a table. - * While this also accepts a query result - * resource identifier, this behavior is - * deprecated. - * @param int $mode a valid tableInfo mode - * - * @return array an associative array with the information requested. - * A DB_Error object on failure. - * - * @see DB_common::tableInfo() - * @since Method available since Release 1.7.0 - */ - function tableInfo($result, $mode = null) - { - if (is_string($result)) { - /* - * Probably received a table name. - * Create a result resource identifier. - */ - $id = @odbc_exec($this->connection, "SELECT * FROM $result"); - if (!$id) { - return $this->odbcRaiseError(); - } - $got_string = true; - } elseif (isset($result->result)) { - /* - * Probably received a result object. - * Extract the result resource identifier. - */ - $id = $result->result; - $got_string = false; - } else { - /* - * Probably received a result resource identifier. - * Copy it. - * Deprecated. Here for compatibility only. - */ - $id = $result; - $got_string = false; - } - - if (!is_resource($id)) { - return $this->odbcRaiseError(DB_ERROR_NEED_MORE_DATA); - } - - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) { - $case_func = 'strtolower'; - } else { - $case_func = 'strval'; - } - - $count = @odbc_num_fields($id); - $res = array(); - - if ($mode) { - $res['num_fields'] = $count; - } - - for ($i = 0; $i < $count; $i++) { - $col = $i + 1; - $res[$i] = array( - 'table' => $got_string ? $case_func($result) : '', - 'name' => $case_func(@odbc_field_name($id, $col)), - 'type' => @odbc_field_type($id, $col), - 'len' => @odbc_field_len($id, $col), - 'flags' => '', - ); - if ($mode & DB_TABLEINFO_ORDER) { - $res['order'][$res[$i]['name']] = $i; - } - if ($mode & DB_TABLEINFO_ORDERTABLE) { - $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i; - } - } - - // free the result only if we were called on a table - if ($got_string) { - @odbc_free_result($id); - } - return $res; - } - - // }}} - // {{{ getSpecialQuery() - - /** - * Obtains the query string needed for listing a given type of objects - * - * Thanks to symbol1@gmail.com and Philippe.Jausions@11abacus.com. - * - * @param string $type the kind of objects you want to retrieve - * - * @return string the list of objects requested - * - * @access protected - * @see DB_common::getListOf() - * @since Method available since Release 1.7.0 - */ - function getSpecialQuery($type) - { - switch ($type) { - case 'databases': - if (!function_exists('odbc_data_source')) { - return null; - } - $res = @odbc_data_source($this->connection, SQL_FETCH_FIRST); - if (is_array($res)) { - $out = array($res['server']); - while($res = @odbc_data_source($this->connection, - SQL_FETCH_NEXT)) - { - $out[] = $res['server']; - } - return $out; - } else { - return $this->odbcRaiseError(); - } - break; - case 'tables': - case 'schema.tables': - $keep = 'TABLE'; - break; - case 'views': - $keep = 'VIEW'; - break; - default: - return null; - } - - /* - * Removing non-conforming items in the while loop rather than - * in the odbc_tables() call because some backends choke on this: - * odbc_tables($this->connection, '', '', '', 'TABLE') - */ - $res = @odbc_tables($this->connection); - if (!$res) { - return $this->odbcRaiseError(); - } - $out = array(); - while ($row = odbc_fetch_array($res)) { - if ($row['TABLE_TYPE'] != $keep) { - continue; - } - if ($type == 'schema.tables') { - $out[] = $row['TABLE_SCHEM'] . '.' . $row['TABLE_NAME']; - } else { - $out[] = $row['TABLE_NAME']; - } - } - return $out; - } - - // }}} - -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ - -?> diff --git a/program/lib/DB/pgsql.php b/program/lib/DB/pgsql.php deleted file mode 100644 index 4491a64..0000000 --- a/program/lib/DB/pgsql.php +++ /dev/null @@ -1,1097 +0,0 @@ - - * @author Stig Bakken - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: pgsql.php 12 2005-10-02 11:36:35Z sparc $ - * @link http://pear.php.net/package/DB - */ - -/** - * Obtain the DB_common class so it can be extended from - */ -require_once 'DB/common.php'; - -/** - * The methods PEAR DB uses to interact with PHP's pgsql extension - * for interacting with PostgreSQL databases - * - * These methods overload the ones declared in DB_common. - * - * @category Database - * @package DB - * @author Rui Hirokawa - * @author Stig Bakken - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - */ -class DB_pgsql extends DB_common -{ - // {{{ properties - - /** - * The DB driver type (mysql, oci8, odbc, etc.) - * @var string - */ - var $phptype = 'pgsql'; - - /** - * The database syntax variant to be used (db2, access, etc.), if any - * @var string - */ - var $dbsyntax = 'pgsql'; - - /** - * The capabilities of this DB implementation - * - * The 'new_link' element contains the PHP version that first provided - * new_link support for this DBMS. Contains false if it's unsupported. - * - * Meaning of the 'limit' element: - * + 'emulate' = emulate with fetch row by number - * + 'alter' = alter the query - * + false = skip rows - * - * @var array - */ - var $features = array( - 'limit' => 'alter', - 'new_link' => '4.3.0', - 'numrows' => true, - 'pconnect' => true, - 'prepare' => false, - 'ssl' => true, - 'transactions' => true, - ); - - /** - * A mapping of native error codes to DB error codes - * @var array - */ - var $errorcode_map = array( - ); - - /** - * The raw database connection created by PHP - * @var resource - */ - var $connection; - - /** - * The DSN information for connecting to a database - * @var array - */ - var $dsn = array(); - - - /** - * Should data manipulation queries be committed automatically? - * @var bool - * @access private - */ - var $autocommit = true; - - /** - * The quantity of transactions begun - * - * {@internal While this is private, it can't actually be designated - * private in PHP 5 because it is directly accessed in the test suite.}} - * - * @var integer - * @access private - */ - var $transaction_opcount = 0; - - /** - * The number of rows affected by a data manipulation query - * @var integer - */ - var $affected = 0; - - /** - * The current row being looked at in fetchInto() - * @var array - * @access private - */ - var $row = array(); - - /** - * The number of rows in a given result set - * @var array - * @access private - */ - var $_num_rows = array(); - - - // }}} - // {{{ constructor - - /** - * This constructor calls $this->DB_common() - * - * @return void - */ - function DB_pgsql() - { - $this->DB_common(); - } - - // }}} - // {{{ connect() - - /** - * Connect to the database server, log in and open the database - * - * Don't call this method directly. Use DB::connect() instead. - * - * PEAR DB's pgsql driver supports the following extra DSN options: - * + connect_timeout How many seconds to wait for a connection to - * be established. Available since PEAR DB 1.7.0. - * + new_link If set to true, causes subsequent calls to - * connect() to return a new connection link - * instead of the existing one. WARNING: this is - * not portable to other DBMS's. Available only - * if PHP is >= 4.3.0 and PEAR DB is >= 1.7.0. - * + options Command line options to be sent to the server. - * Available since PEAR DB 1.6.4. - * + service Specifies a service name in pg_service.conf that - * holds additional connection parameters. - * Available since PEAR DB 1.7.0. - * + sslmode How should SSL be used when connecting? Values: - * disable, allow, prefer or require. - * Available since PEAR DB 1.7.0. - * + tty This was used to specify where to send server - * debug output. Available since PEAR DB 1.6.4. - * - * Example of connecting to a new link via a socket: - * - * require_once 'DB.php'; - * - * $dsn = 'pgsql://user:pass@unix(/tmp)/dbname?new_link=true'; - * $options = array( - * 'portability' => DB_PORTABILITY_ALL, - * ); - * - * $db =& DB::connect($dsn, $options); - * if (PEAR::isError($db)) { - * die($db->getMessage()); - * } - * - * - * @param array $dsn the data source name - * @param bool $persistent should the connection be persistent? - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @link http://www.postgresql.org/docs/current/static/libpq.html#LIBPQ-CONNECT - */ - function connect($dsn, $persistent = false) - { - if (!PEAR::loadExtension('pgsql')) { - return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND); - } - - $this->dsn = $dsn; - if ($dsn['dbsyntax']) { - $this->dbsyntax = $dsn['dbsyntax']; - } - - $protocol = $dsn['protocol'] ? $dsn['protocol'] : 'tcp'; - - $params = array(''); - if ($protocol == 'tcp') { - if ($dsn['hostspec']) { - $params[0] .= 'host=' . $dsn['hostspec']; - } - if ($dsn['port']) { - $params[0] .= ' port=' . $dsn['port']; - } - } elseif ($protocol == 'unix') { - // Allow for pg socket in non-standard locations. - if ($dsn['socket']) { - $params[0] .= 'host=' . $dsn['socket']; - } - if ($dsn['port']) { - $params[0] .= ' port=' . $dsn['port']; - } - } - if ($dsn['database']) { - $params[0] .= ' dbname=\'' . addslashes($dsn['database']) . '\''; - } - if ($dsn['username']) { - $params[0] .= ' user=\'' . addslashes($dsn['username']) . '\''; - } - if ($dsn['password']) { - $params[0] .= ' password=\'' . addslashes($dsn['password']) . '\''; - } - if (!empty($dsn['options'])) { - $params[0] .= ' options=' . $dsn['options']; - } - if (!empty($dsn['tty'])) { - $params[0] .= ' tty=' . $dsn['tty']; - } - if (!empty($dsn['connect_timeout'])) { - $params[0] .= ' connect_timeout=' . $dsn['connect_timeout']; - } - if (!empty($dsn['sslmode'])) { - $params[0] .= ' sslmode=' . $dsn['sslmode']; - } - if (!empty($dsn['service'])) { - $params[0] .= ' service=' . $dsn['service']; - } - - if (isset($dsn['new_link']) - && ($dsn['new_link'] == 'true' || $dsn['new_link'] === true)) - { - if (version_compare(phpversion(), '4.3.0', '>=')) { - $params[] = PGSQL_CONNECT_FORCE_NEW; - } - } - - $connect_function = $persistent ? 'pg_pconnect' : 'pg_connect'; - - $ini = ini_get('track_errors'); - $php_errormsg = ''; - if ($ini) { - $this->connection = @call_user_func_array($connect_function, - $params); - } else { - ini_set('track_errors', 1); - $this->connection = @call_user_func_array($connect_function, - $params); - ini_set('track_errors', $ini); - } - - if (!$this->connection) { - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - $php_errormsg); - } - return DB_OK; - } - - // }}} - // {{{ disconnect() - - /** - * Disconnects from the database server - * - * @return bool TRUE on success, FALSE on failure - */ - function disconnect() - { - $ret = @pg_close($this->connection); - $this->connection = null; - return $ret; - } - - // }}} - // {{{ simpleQuery() - - /** - * Sends a query to the database server - * - * @param string the SQL query string - * - * @return mixed + a PHP result resrouce for successful SELECT queries - * + the DB_OK constant for other successful queries - * + a DB_Error object on failure - */ - function simpleQuery($query) - { - $ismanip = DB::isManip($query); - $this->last_query = $query; - $query = $this->modifyQuery($query); - if (!$this->autocommit && $ismanip) { - if ($this->transaction_opcount == 0) { - $result = @pg_exec($this->connection, 'begin;'); - if (!$result) { - return $this->pgsqlRaiseError(); - } - } - $this->transaction_opcount++; - } - $result = @pg_exec($this->connection, $query); - if (!$result) { - return $this->pgsqlRaiseError(); - } - // Determine which queries that should return data, and which - // should return an error code only. - if ($ismanip) { - $this->affected = @pg_affected_rows($result); - return DB_OK; - } elseif (preg_match('/^\s*\(*\s*(SELECT|EXPLAIN|SHOW)\s/si', $query)) { - /* PostgreSQL commands: - ABORT, ALTER, BEGIN, CLOSE, CLUSTER, COMMIT, COPY, - CREATE, DECLARE, DELETE, DROP TABLE, EXPLAIN, FETCH, - GRANT, INSERT, LISTEN, LOAD, LOCK, MOVE, NOTIFY, RESET, - REVOKE, ROLLBACK, SELECT, SELECT INTO, SET, SHOW, - UNLISTEN, UPDATE, VACUUM - */ - $this->row[(int)$result] = 0; // reset the row counter. - $numrows = $this->numRows($result); - if (is_object($numrows)) { - return $numrows; - } - $this->_num_rows[(int)$result] = $numrows; - $this->affected = 0; - return $result; - } else { - $this->affected = 0; - return DB_OK; - } - } - - // }}} - // {{{ nextResult() - - /** - * Move the internal pgsql result pointer to the next available result - * - * @param a valid fbsql result resource - * - * @access public - * - * @return true if a result is available otherwise return false - */ - function nextResult($result) - { - return false; - } - - // }}} - // {{{ fetchInto() - - /** - * Places a row from the result set into the given array - * - * Formating of the array and the data therein are configurable. - * See DB_result::fetchInto() for more information. - * - * This method is not meant to be called directly. Use - * DB_result::fetchInto() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result the query result resource - * @param array $arr the referenced array to put the data in - * @param int $fetchmode how the resulting array should be indexed - * @param int $rownum the row number to fetch (0 = first row) - * - * @return mixed DB_OK on success, NULL when the end of a result set is - * reached or on failure - * - * @see DB_result::fetchInto() - */ - function fetchInto($result, &$arr, $fetchmode, $rownum = null) - { - $result_int = (int)$result; - $rownum = ($rownum !== null) ? $rownum : $this->row[$result_int]; - if ($rownum >= $this->_num_rows[$result_int]) { - return null; - } - if ($fetchmode & DB_FETCHMODE_ASSOC) { - $arr = @pg_fetch_array($result, $rownum, PGSQL_ASSOC); - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE && $arr) { - $arr = array_change_key_case($arr, CASE_LOWER); - } - } else { - $arr = @pg_fetch_row($result, $rownum); - } - if (!$arr) { - return null; - } - if ($this->options['portability'] & DB_PORTABILITY_RTRIM) { - $this->_rtrimArrayValues($arr); - } - if ($this->options['portability'] & DB_PORTABILITY_NULL_TO_EMPTY) { - $this->_convertNullArrayValuesToEmpty($arr); - } - $this->row[$result_int] = ++$rownum; - return DB_OK; - } - - // }}} - // {{{ freeResult() - - /** - * Deletes the result set and frees the memory occupied by the result set - * - * This method is not meant to be called directly. Use - * DB_result::free() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return bool TRUE on success, FALSE if $result is invalid - * - * @see DB_result::free() - */ - function freeResult($result) - { - if (is_resource($result)) { - unset($this->row[(int)$result]); - unset($this->_num_rows[(int)$result]); - $this->affected = 0; - return @pg_freeresult($result); - } - return false; - } - - // }}} - // {{{ quote() - - /** - * @deprecated Deprecated in release 1.6.0 - * @internal - */ - function quote($str) - { - return $this->quoteSmart($str); - } - - // }}} - // {{{ quoteSmart() - - /** - * Formats input so it can be safely used in a query - * - * @param mixed $in the data to be formatted - * - * @return mixed the formatted data. The format depends on the input's - * PHP type: - * + null = the string NULL - * + boolean = string TRUE or FALSE - * + integer or double = the unquoted number - * + other (including strings and numeric strings) = - * the data escaped according to MySQL's settings - * then encapsulated between single quotes - * - * @see DB_common::quoteSmart() - * @since Method available since Release 1.6.0 - */ - function quoteSmart($in) - { - if (is_int($in) || is_double($in)) { - return $in; - } elseif (is_bool($in)) { - return $in ? 'TRUE' : 'FALSE'; - } elseif (is_null($in)) { - return 'NULL'; - } else { - return "'" . $this->escapeSimple($in) . "'"; - } - } - - // }}} - // {{{ escapeSimple() - - /** - * Escapes a string according to the current DBMS's standards - * - * {@internal PostgreSQL treats a backslash as an escape character, - * so they are escaped as well. - * - * Not using pg_escape_string() yet because it requires PostgreSQL - * to be at version 7.2 or greater.}} - * - * @param string $str the string to be escaped - * - * @return string the escaped string - * - * @see DB_common::quoteSmart() - * @since Method available since Release 1.6.0 - */ - function escapeSimple($str) - { - return str_replace("'", "''", str_replace('\\', '\\\\', $str)); - } - - // }}} - // {{{ numCols() - - /** - * Gets the number of columns in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numCols() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of columns. A DB_Error object on failure. - * - * @see DB_result::numCols() - */ - function numCols($result) - { - $cols = @pg_numfields($result); - if (!$cols) { - return $this->pgsqlRaiseError(); - } - return $cols; - } - - // }}} - // {{{ numRows() - - /** - * Gets the number of rows in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numRows() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of rows. A DB_Error object on failure. - * - * @see DB_result::numRows() - */ - function numRows($result) - { - $rows = @pg_numrows($result); - if ($rows === null) { - return $this->pgsqlRaiseError(); - } - return $rows; - } - - // }}} - // {{{ autoCommit() - - /** - * Enables or disables automatic commits - * - * @param bool $onoff true turns it on, false turns it off - * - * @return int DB_OK on success. A DB_Error object if the driver - * doesn't support auto-committing transactions. - */ - function autoCommit($onoff = false) - { - // XXX if $this->transaction_opcount > 0, we should probably - // issue a warning here. - $this->autocommit = $onoff ? true : false; - return DB_OK; - } - - // }}} - // {{{ commit() - - /** - * Commits the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function commit() - { - if ($this->transaction_opcount > 0) { - // (disabled) hack to shut up error messages from libpq.a - //@fclose(@fopen("php://stderr", "w")); - $result = @pg_exec($this->connection, 'end;'); - $this->transaction_opcount = 0; - if (!$result) { - return $this->pgsqlRaiseError(); - } - } - return DB_OK; - } - - // }}} - // {{{ rollback() - - /** - * Reverts the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function rollback() - { - if ($this->transaction_opcount > 0) { - $result = @pg_exec($this->connection, 'abort;'); - $this->transaction_opcount = 0; - if (!$result) { - return $this->pgsqlRaiseError(); - } - } - return DB_OK; - } - - // }}} - // {{{ affectedRows() - - /** - * Determines the number of rows affected by a data maniuplation query - * - * 0 is returned for queries that don't manipulate data. - * - * @return int the number of rows. A DB_Error object on failure. - */ - function affectedRows() - { - return $this->affected; - } - - // }}} - // {{{ nextId() - - /** - * Returns the next free id in a sequence - * - * @param string $seq_name name of the sequence - * @param boolean $ondemand when true, the seqence is automatically - * created if it does not exist - * - * @return int the next id number in the sequence. - * A DB_Error object on failure. - * - * @see DB_common::nextID(), DB_common::getSequenceName(), - * DB_pgsql::createSequence(), DB_pgsql::dropSequence() - */ - function nextId($seq_name, $ondemand = true) - { - $seqname = $this->getSequenceName($seq_name); - $repeat = false; - do { - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $result =& $this->query("SELECT NEXTVAL('${seqname}')"); - $this->popErrorHandling(); - if ($ondemand && DB::isError($result) && - $result->getCode() == DB_ERROR_NOSUCHTABLE) { - $repeat = true; - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $result = $this->createSequence($seq_name); - $this->popErrorHandling(); - if (DB::isError($result)) { - return $this->raiseError($result); - } - } else { - $repeat = false; - } - } while ($repeat); - if (DB::isError($result)) { - return $this->raiseError($result); - } - $arr = $result->fetchRow(DB_FETCHMODE_ORDERED); - $result->free(); - return $arr[0]; - } - - // }}} - // {{{ createSequence() - - /** - * Creates a new sequence - * - * @param string $seq_name name of the new sequence - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::createSequence(), DB_common::getSequenceName(), - * DB_pgsql::nextID(), DB_pgsql::dropSequence() - */ - function createSequence($seq_name) - { - $seqname = $this->getSequenceName($seq_name); - $result = $this->query("CREATE SEQUENCE ${seqname}"); - return $result; - } - - // }}} - // {{{ dropSequence() - - /** - * Deletes a sequence - * - * @param string $seq_name name of the sequence to be deleted - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::dropSequence(), DB_common::getSequenceName(), - * DB_pgsql::nextID(), DB_pgsql::createSequence() - */ - function dropSequence($seq_name) - { - return $this->query('DROP SEQUENCE ' - . $this->getSequenceName($seq_name)); - } - - // }}} - // {{{ modifyLimitQuery() - - /** - * Adds LIMIT clauses to a query string according to current DBMS standards - * - * @param string $query the query to modify - * @param int $from the row to start to fetching (0 = the first row) - * @param int $count the numbers of rows to fetch - * @param mixed $params array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 placeholder for non-array - * parameters or 1 placeholder per array element. - * - * @return string the query string with LIMIT clauses added - * - * @access protected - */ - function modifyLimitQuery($query, $from, $count, $params = array()) - { - return "$query LIMIT $count OFFSET $from"; - } - - // }}} - // {{{ pgsqlRaiseError() - - /** - * Produces a DB_Error object regarding the current problem - * - * @param int $errno if the error is being manually raised pass a - * DB_ERROR* constant here. If this isn't passed - * the error information gathered from the DBMS. - * - * @return object the DB_Error object - * - * @see DB_common::raiseError(), - * DB_pgsql::errorNative(), DB_pgsql::errorCode() - */ - function pgsqlRaiseError($errno = null) - { - $native = $this->errorNative(); - if ($errno === null) { - $errno = $this->errorCode($native); - } - return $this->raiseError($errno, null, null, null, $native); - } - - // }}} - // {{{ errorNative() - - /** - * Gets the DBMS' native error message produced by the last query - * - * {@internal Error messages are used instead of error codes - * in order to support older versions of PostgreSQL.}} - * - * @return string the DBMS' error message - */ - function errorNative() - { - return @pg_errormessage($this->connection); - } - - // }}} - // {{{ errorCode() - - /** - * Determines PEAR::DB error code from the database's text error message. - * - * @param string $errormsg error message returned from the database - * @return integer an error number from a DB error constant - */ - function errorCode($errormsg) - { - static $error_regexps; - if (!isset($error_regexps)) { - $error_regexps = array( - '/(relation|sequence|table).*does not exist|class .* not found/i' - => DB_ERROR_NOSUCHTABLE, - '/index .* does not exist/' - => DB_ERROR_NOT_FOUND, - '/column .* does not exist/i' - => DB_ERROR_NOSUCHFIELD, - '/relation .* already exists/i' - => DB_ERROR_ALREADY_EXISTS, - '/(divide|division) by zero$/i' - => DB_ERROR_DIVZERO, - '/pg_atoi: error in .*: can\'t parse /i' - => DB_ERROR_INVALID_NUMBER, - '/invalid input syntax for( type)? (integer|numeric)/i' - => DB_ERROR_INVALID_NUMBER, - '/value .* is out of range for type \w*int/i' - => DB_ERROR_INVALID_NUMBER, - '/integer out of range/i' - => DB_ERROR_INVALID_NUMBER, - '/value too long for type character/i' - => DB_ERROR_INVALID, - '/attribute .* not found|relation .* does not have attribute/i' - => DB_ERROR_NOSUCHFIELD, - '/column .* specified in USING clause does not exist in (left|right) table/i' - => DB_ERROR_NOSUCHFIELD, - '/parser: parse error at or near/i' - => DB_ERROR_SYNTAX, - '/syntax error at/' - => DB_ERROR_SYNTAX, - '/column reference .* is ambiguous/i' - => DB_ERROR_SYNTAX, - '/permission denied/' - => DB_ERROR_ACCESS_VIOLATION, - '/violates not-null constraint/' - => DB_ERROR_CONSTRAINT_NOT_NULL, - '/violates [\w ]+ constraint/' - => DB_ERROR_CONSTRAINT, - '/referential integrity violation/' - => DB_ERROR_CONSTRAINT, - '/more expressions than target columns/i' - => DB_ERROR_VALUE_COUNT_ON_ROW, - ); - } - foreach ($error_regexps as $regexp => $code) { - if (preg_match($regexp, $errormsg)) { - return $code; - } - } - // Fall back to DB_ERROR if there was no mapping. - return DB_ERROR; - } - - // }}} - // {{{ tableInfo() - - /** - * Returns information about a table or a result set - * - * NOTE: only supports 'table' and 'flags' if $result - * is a table name. - * - * @param object|string $result DB_result object from a query or a - * string containing the name of a table. - * While this also accepts a query result - * resource identifier, this behavior is - * deprecated. - * @param int $mode a valid tableInfo mode - * - * @return array an associative array with the information requested. - * A DB_Error object on failure. - * - * @see DB_common::tableInfo() - */ - function tableInfo($result, $mode = null) - { - if (is_string($result)) { - /* - * Probably received a table name. - * Create a result resource identifier. - */ - $id = @pg_exec($this->connection, "SELECT * FROM $result LIMIT 0"); - $got_string = true; - } elseif (isset($result->result)) { - /* - * Probably received a result object. - * Extract the result resource identifier. - */ - $id = $result->result; - $got_string = false; - } else { - /* - * Probably received a result resource identifier. - * Copy it. - * Deprecated. Here for compatibility only. - */ - $id = $result; - $got_string = false; - } - - if (!is_resource($id)) { - return $this->pgsqlRaiseError(DB_ERROR_NEED_MORE_DATA); - } - - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) { - $case_func = 'strtolower'; - } else { - $case_func = 'strval'; - } - - $count = @pg_numfields($id); - $res = array(); - - if ($mode) { - $res['num_fields'] = $count; - } - - for ($i = 0; $i < $count; $i++) { - $res[$i] = array( - 'table' => $got_string ? $case_func($result) : '', - 'name' => $case_func(@pg_fieldname($id, $i)), - 'type' => @pg_fieldtype($id, $i), - 'len' => @pg_fieldsize($id, $i), - 'flags' => $got_string - ? $this->_pgFieldFlags($id, $i, $result) - : '', - ); - if ($mode & DB_TABLEINFO_ORDER) { - $res['order'][$res[$i]['name']] = $i; - } - if ($mode & DB_TABLEINFO_ORDERTABLE) { - $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i; - } - } - - // free the result only if we were called on a table - if ($got_string) { - @pg_freeresult($id); - } - return $res; - } - - // }}} - // {{{ _pgFieldFlags() - - /** - * Get a column's flags - * - * Supports "not_null", "default_value", "primary_key", "unique_key" - * and "multiple_key". The default value is passed through - * rawurlencode() in case there are spaces in it. - * - * @param int $resource the PostgreSQL result identifier - * @param int $num_field the field number - * - * @return string the flags - * - * @access private - */ - function _pgFieldFlags($resource, $num_field, $table_name) - { - $field_name = @pg_fieldname($resource, $num_field); - - $result = @pg_exec($this->connection, "SELECT f.attnotnull, f.atthasdef - FROM pg_attribute f, pg_class tab, pg_type typ - WHERE tab.relname = typ.typname - AND typ.typrelid = f.attrelid - AND f.attname = '$field_name' - AND tab.relname = '$table_name'"); - if (@pg_numrows($result) > 0) { - $row = @pg_fetch_row($result, 0); - $flags = ($row[0] == 't') ? 'not_null ' : ''; - - if ($row[1] == 't') { - $result = @pg_exec($this->connection, "SELECT a.adsrc - FROM pg_attribute f, pg_class tab, pg_type typ, pg_attrdef a - WHERE tab.relname = typ.typname AND typ.typrelid = f.attrelid - AND f.attrelid = a.adrelid AND f.attname = '$field_name' - AND tab.relname = '$table_name' AND f.attnum = a.adnum"); - $row = @pg_fetch_row($result, 0); - $num = preg_replace("/'(.*)'::\w+/", "\\1", $row[0]); - $flags .= 'default_' . rawurlencode($num) . ' '; - } - } else { - $flags = ''; - } - $result = @pg_exec($this->connection, "SELECT i.indisunique, i.indisprimary, i.indkey - FROM pg_attribute f, pg_class tab, pg_type typ, pg_index i - WHERE tab.relname = typ.typname - AND typ.typrelid = f.attrelid - AND f.attrelid = i.indrelid - AND f.attname = '$field_name' - AND tab.relname = '$table_name'"); - $count = @pg_numrows($result); - - for ($i = 0; $i < $count ; $i++) { - $row = @pg_fetch_row($result, $i); - $keys = explode(' ', $row[2]); - - if (in_array($num_field + 1, $keys)) { - $flags .= ($row[0] == 't' && $row[1] == 'f') ? 'unique_key ' : ''; - $flags .= ($row[1] == 't') ? 'primary_key ' : ''; - if (count($keys) > 1) - $flags .= 'multiple_key '; - } - } - - return trim($flags); - } - - // }}} - // {{{ getSpecialQuery() - - /** - * Obtains the query string needed for listing a given type of objects - * - * @param string $type the kind of objects you want to retrieve - * - * @return string the SQL query string or null if the driver doesn't - * support the object type requested - * - * @access protected - * @see DB_common::getListOf() - */ - function getSpecialQuery($type) - { - switch ($type) { - case 'tables': - return 'SELECT c.relname AS "Name"' - . ' FROM pg_class c, pg_user u' - . ' WHERE c.relowner = u.usesysid' - . " AND c.relkind = 'r'" - . ' AND NOT EXISTS' - . ' (SELECT 1 FROM pg_views' - . ' WHERE viewname = c.relname)' - . " AND c.relname !~ '^(pg_|sql_)'" - . ' UNION' - . ' SELECT c.relname AS "Name"' - . ' FROM pg_class c' - . " WHERE c.relkind = 'r'" - . ' AND NOT EXISTS' - . ' (SELECT 1 FROM pg_views' - . ' WHERE viewname = c.relname)' - . ' AND NOT EXISTS' - . ' (SELECT 1 FROM pg_user' - . ' WHERE usesysid = c.relowner)' - . " AND c.relname !~ '^pg_'"; - case 'schema.tables': - return "SELECT schemaname || '.' || tablename" - . ' AS "Name"' - . ' FROM pg_catalog.pg_tables' - . ' WHERE schemaname NOT IN' - . " ('pg_catalog', 'information_schema', 'pg_toast')"; - case 'views': - // Table cols: viewname | viewowner | definition - return 'SELECT viewname from pg_views WHERE schemaname' - . " NOT IN ('information_schema', 'pg_catalog')"; - case 'users': - // cols: usename |usesysid|usecreatedb|usetrace|usesuper|usecatupd|passwd |valuntil - return 'SELECT usename FROM pg_user'; - case 'databases': - return 'SELECT datname FROM pg_database'; - case 'functions': - case 'procedures': - return 'SELECT proname FROM pg_proc WHERE proowner <> 1'; - default: - return null; - } - } - - // }}} - -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ - -?> diff --git a/program/lib/DB/sqlite.php b/program/lib/DB/sqlite.php deleted file mode 100644 index 3619f59..0000000 --- a/program/lib/DB/sqlite.php +++ /dev/null @@ -1,942 +0,0 @@ - - * @author Mika Tuupola - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 3.0 - * @version CVS: $Id: sqlite.php 12 2005-10-02 11:36:35Z sparc $ - * @link http://pear.php.net/package/DB - */ - -/** - * Obtain the DB_common class so it can be extended from - */ -require_once 'DB/common.php'; - -/** - * The methods PEAR DB uses to interact with PHP's sqlite extension - * for interacting with SQLite databases - * - * These methods overload the ones declared in DB_common. - * - * NOTICE: This driver needs PHP's track_errors ini setting to be on. - * It is automatically turned on when connecting to the database. - * Make sure your scripts don't turn it off. - * - * @category Database - * @package DB - * @author Urs Gehrig - * @author Mika Tuupola - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - */ -class DB_sqlite extends DB_common -{ - // {{{ properties - - /** - * The DB driver type (mysql, oci8, odbc, etc.) - * @var string - */ - var $phptype = 'sqlite'; - - /** - * The database syntax variant to be used (db2, access, etc.), if any - * @var string - */ - var $dbsyntax = 'sqlite'; - - /** - * The capabilities of this DB implementation - * - * The 'new_link' element contains the PHP version that first provided - * new_link support for this DBMS. Contains false if it's unsupported. - * - * Meaning of the 'limit' element: - * + 'emulate' = emulate with fetch row by number - * + 'alter' = alter the query - * + false = skip rows - * - * @var array - */ - var $features = array( - 'limit' => 'alter', - 'new_link' => false, - 'numrows' => true, - 'pconnect' => true, - 'prepare' => false, - 'ssl' => false, - 'transactions' => false, - ); - - /** - * A mapping of native error codes to DB error codes - * - * {@internal Error codes according to sqlite_exec. See the online - * manual at http://sqlite.org/c_interface.html for info. - * This error handling based on sqlite_exec is not yet implemented.}} - * - * @var array - */ - var $errorcode_map = array( - ); - - /** - * The raw database connection created by PHP - * @var resource - */ - var $connection; - - /** - * The DSN information for connecting to a database - * @var array - */ - var $dsn = array(); - - - /** - * SQLite data types - * - * @link http://www.sqlite.org/datatypes.html - * - * @var array - */ - var $keywords = array ( - 'BLOB' => '', - 'BOOLEAN' => '', - 'CHARACTER' => '', - 'CLOB' => '', - 'FLOAT' => '', - 'INTEGER' => '', - 'KEY' => '', - 'NATIONAL' => '', - 'NUMERIC' => '', - 'NVARCHAR' => '', - 'PRIMARY' => '', - 'TEXT' => '', - 'TIMESTAMP' => '', - 'UNIQUE' => '', - 'VARCHAR' => '', - 'VARYING' => '', - ); - - /** - * The most recent error message from $php_errormsg - * @var string - * @access private - */ - var $_lasterror = ''; - - - // }}} - // {{{ constructor - - /** - * This constructor calls $this->DB_common() - * - * @return void - */ - function DB_sqlite() - { - $this->DB_common(); - } - - // }}} - // {{{ connect() - - /** - * Connect to the database server, log in and open the database - * - * Don't call this method directly. Use DB::connect() instead. - * - * PEAR DB's sqlite driver supports the following extra DSN options: - * + mode The permissions for the database file, in four digit - * chmod octal format (eg "0600"). - * - * Example of connecting to a database in read-only mode: - * - * require_once 'DB.php'; - * - * $dsn = 'sqlite:///path/and/name/of/db/file?mode=0400'; - * $options = array( - * 'portability' => DB_PORTABILITY_ALL, - * ); - * - * $db =& DB::connect($dsn, $options); - * if (PEAR::isError($db)) { - * die($db->getMessage()); - * } - * - * - * @param array $dsn the data source name - * @param bool $persistent should the connection be persistent? - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function connect($dsn, $persistent = false) - { - if (!PEAR::loadExtension('sqlite')) { - return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND); - } - - $this->dsn = $dsn; - if ($dsn['dbsyntax']) { - $this->dbsyntax = $dsn['dbsyntax']; - } - - if ($dsn['database']) { - if (!file_exists($dsn['database'])) { - if (!touch($dsn['database'])) { - return $this->sqliteRaiseError(DB_ERROR_NOT_FOUND); - } - if (!isset($dsn['mode']) || - !is_numeric($dsn['mode'])) - { - $mode = 0644; - } else { - $mode = octdec($dsn['mode']); - } - if (!chmod($dsn['database'], $mode)) { - return $this->sqliteRaiseError(DB_ERROR_NOT_FOUND); - } - if (!file_exists($dsn['database'])) { - return $this->sqliteRaiseError(DB_ERROR_NOT_FOUND); - } - } - if (!is_file($dsn['database'])) { - return $this->sqliteRaiseError(DB_ERROR_INVALID); - } - if (!is_readable($dsn['database'])) { - return $this->sqliteRaiseError(DB_ERROR_ACCESS_VIOLATION); - } - } else { - return $this->sqliteRaiseError(DB_ERROR_ACCESS_VIOLATION); - } - - $connect_function = $persistent ? 'sqlite_popen' : 'sqlite_open'; - - // track_errors must remain on for simpleQuery() - ini_set('track_errors', 1); - $php_errormsg = ''; - - if (!$this->connection = @$connect_function($dsn['database'])) { - return $this->raiseError(DB_ERROR_NODBSELECTED, - null, null, null, - $php_errormsg); - } - return DB_OK; - } - - // }}} - // {{{ disconnect() - - /** - * Disconnects from the database server - * - * @return bool TRUE on success, FALSE on failure - */ - function disconnect() - { - $ret = @sqlite_close($this->connection); - $this->connection = null; - return $ret; - } - - // }}} - // {{{ simpleQuery() - - /** - * Sends a query to the database server - * - * NOTICE: This method needs PHP's track_errors ini setting to be on. - * It is automatically turned on when connecting to the database. - * Make sure your scripts don't turn it off. - * - * @param string the SQL query string - * - * @return mixed + a PHP result resrouce for successful SELECT queries - * + the DB_OK constant for other successful queries - * + a DB_Error object on failure - */ - function simpleQuery($query) - { - $ismanip = DB::isManip($query); - $this->last_query = $query; - $query = $this->modifyQuery($query); - - $php_errormsg = ''; - - $result = @sqlite_query($query, $this->connection); - $this->_lasterror = $php_errormsg ? $php_errormsg : ''; - - $this->result = $result; - if (!$this->result) { - return $this->sqliteRaiseError(null); - } - - // sqlite_query() seems to allways return a resource - // so cant use that. Using $ismanip instead - if (!$ismanip) { - $numRows = $this->numRows($result); - if (is_object($numRows)) { - // we've got PEAR_Error - return $numRows; - } - return $result; - } - return DB_OK; - } - - // }}} - // {{{ nextResult() - - /** - * Move the internal sqlite result pointer to the next available result - * - * @param resource $result the valid sqlite result resource - * - * @return bool true if a result is available otherwise return false - */ - function nextResult($result) - { - return false; - } - - // }}} - // {{{ fetchInto() - - /** - * Places a row from the result set into the given array - * - * Formating of the array and the data therein are configurable. - * See DB_result::fetchInto() for more information. - * - * This method is not meant to be called directly. Use - * DB_result::fetchInto() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result the query result resource - * @param array $arr the referenced array to put the data in - * @param int $fetchmode how the resulting array should be indexed - * @param int $rownum the row number to fetch (0 = first row) - * - * @return mixed DB_OK on success, NULL when the end of a result set is - * reached or on failure - * - * @see DB_result::fetchInto() - */ - function fetchInto($result, &$arr, $fetchmode, $rownum = null) - { - if ($rownum !== null) { - if (!@sqlite_seek($this->result, $rownum)) { - return null; - } - } - if ($fetchmode & DB_FETCHMODE_ASSOC) { - $arr = @sqlite_fetch_array($result, SQLITE_ASSOC); - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE && $arr) { - $arr = array_change_key_case($arr, CASE_LOWER); - } - } else { - $arr = @sqlite_fetch_array($result, SQLITE_NUM); - } - if (!$arr) { - return null; - } - if ($this->options['portability'] & DB_PORTABILITY_RTRIM) { - /* - * Even though this DBMS already trims output, we do this because - * a field might have intentional whitespace at the end that - * gets removed by DB_PORTABILITY_RTRIM under another driver. - */ - $this->_rtrimArrayValues($arr); - } - if ($this->options['portability'] & DB_PORTABILITY_NULL_TO_EMPTY) { - $this->_convertNullArrayValuesToEmpty($arr); - } - return DB_OK; - } - - // }}} - // {{{ freeResult() - - /** - * Deletes the result set and frees the memory occupied by the result set - * - * This method is not meant to be called directly. Use - * DB_result::free() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return bool TRUE on success, FALSE if $result is invalid - * - * @see DB_result::free() - */ - function freeResult(&$result) - { - // XXX No native free? - if (!is_resource($result)) { - return false; - } - $result = null; - return true; - } - - // }}} - // {{{ numCols() - - /** - * Gets the number of columns in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numCols() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of columns. A DB_Error object on failure. - * - * @see DB_result::numCols() - */ - function numCols($result) - { - $cols = @sqlite_num_fields($result); - if (!$cols) { - return $this->sqliteRaiseError(); - } - return $cols; - } - - // }}} - // {{{ numRows() - - /** - * Gets the number of rows in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numRows() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of rows. A DB_Error object on failure. - * - * @see DB_result::numRows() - */ - function numRows($result) - { - $rows = @sqlite_num_rows($result); - if ($rows === null) { - return $this->sqliteRaiseError(); - } - return $rows; - } - - // }}} - // {{{ affected() - - /** - * Determines the number of rows affected by a data maniuplation query - * - * 0 is returned for queries that don't manipulate data. - * - * @return int the number of rows. A DB_Error object on failure. - */ - function affectedRows() - { - return @sqlite_changes($this->connection); - } - - // }}} - // {{{ dropSequence() - - /** - * Deletes a sequence - * - * @param string $seq_name name of the sequence to be deleted - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::dropSequence(), DB_common::getSequenceName(), - * DB_sqlite::nextID(), DB_sqlite::createSequence() - */ - function dropSequence($seq_name) - { - return $this->query('DROP TABLE ' . $this->getSequenceName($seq_name)); - } - - /** - * Creates a new sequence - * - * @param string $seq_name name of the new sequence - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::createSequence(), DB_common::getSequenceName(), - * DB_sqlite::nextID(), DB_sqlite::dropSequence() - */ - function createSequence($seq_name) - { - $seqname = $this->getSequenceName($seq_name); - $query = 'CREATE TABLE ' . $seqname . - ' (id INTEGER UNSIGNED PRIMARY KEY) '; - $result = $this->query($query); - if (DB::isError($result)) { - return($result); - } - $query = "CREATE TRIGGER ${seqname}_cleanup AFTER INSERT ON $seqname - BEGIN - DELETE FROM $seqname WHERE idquery($query); - if (DB::isError($result)) { - return($result); - } - } - - // }}} - // {{{ nextId() - - /** - * Returns the next free id in a sequence - * - * @param string $seq_name name of the sequence - * @param boolean $ondemand when true, the seqence is automatically - * created if it does not exist - * - * @return int the next id number in the sequence. - * A DB_Error object on failure. - * - * @see DB_common::nextID(), DB_common::getSequenceName(), - * DB_sqlite::createSequence(), DB_sqlite::dropSequence() - */ - function nextId($seq_name, $ondemand = true) - { - $seqname = $this->getSequenceName($seq_name); - - do { - $repeat = 0; - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $result = $this->query("INSERT INTO $seqname (id) VALUES (NULL)"); - $this->popErrorHandling(); - if ($result === DB_OK) { - $id = @sqlite_last_insert_rowid($this->connection); - if ($id != 0) { - return $id; - } - } elseif ($ondemand && DB::isError($result) && - $result->getCode() == DB_ERROR_NOSUCHTABLE) - { - $result = $this->createSequence($seq_name); - if (DB::isError($result)) { - return $this->raiseError($result); - } else { - $repeat = 1; - } - } - } while ($repeat); - - return $this->raiseError($result); - } - - // }}} - // {{{ getDbFileStats() - - /** - * Get the file stats for the current database - * - * Possible arguments are dev, ino, mode, nlink, uid, gid, rdev, size, - * atime, mtime, ctime, blksize, blocks or a numeric key between - * 0 and 12. - * - * @param string $arg the array key for stats() - * - * @return mixed an array on an unspecified key, integer on a passed - * arg and false at a stats error - */ - function getDbFileStats($arg = '') - { - $stats = stat($this->dsn['database']); - if ($stats == false) { - return false; - } - if (is_array($stats)) { - if (is_numeric($arg)) { - if (((int)$arg <= 12) & ((int)$arg >= 0)) { - return false; - } - return $stats[$arg ]; - } - if (array_key_exists(trim($arg), $stats)) { - return $stats[$arg ]; - } - } - return $stats; - } - - // }}} - // {{{ escapeSimple() - - /** - * Escapes a string according to the current DBMS's standards - * - * In SQLite, this makes things safe for inserts/updates, but may - * cause problems when performing text comparisons against columns - * containing binary data. See the - * {@link http://php.net/sqlite_escape_string PHP manual} for more info. - * - * @param string $str the string to be escaped - * - * @return string the escaped string - * - * @since Method available since Release 1.6.1 - * @see DB_common::escapeSimple() - */ - function escapeSimple($str) - { - return @sqlite_escape_string($str); - } - - // }}} - // {{{ modifyLimitQuery() - - /** - * Adds LIMIT clauses to a query string according to current DBMS standards - * - * @param string $query the query to modify - * @param int $from the row to start to fetching (0 = the first row) - * @param int $count the numbers of rows to fetch - * @param mixed $params array, string or numeric data to be used in - * execution of the statement. Quantity of items - * passed must match quantity of placeholders in - * query: meaning 1 placeholder for non-array - * parameters or 1 placeholder per array element. - * - * @return string the query string with LIMIT clauses added - * - * @access protected - */ - function modifyLimitQuery($query, $from, $count, $params = array()) - { - return "$query LIMIT $count OFFSET $from"; - } - - // }}} - // {{{ modifyQuery() - - /** - * Changes a query string for various DBMS specific reasons - * - * This little hack lets you know how many rows were deleted - * when running a "DELETE FROM table" query. Only implemented - * if the DB_PORTABILITY_DELETE_COUNT portability option is on. - * - * @param string $query the query string to modify - * - * @return string the modified query string - * - * @access protected - * @see DB_common::setOption() - */ - function modifyQuery($query) - { - if ($this->options['portability'] & DB_PORTABILITY_DELETE_COUNT) { - if (preg_match('/^\s*DELETE\s+FROM\s+(\S+)\s*$/i', $query)) { - $query = preg_replace('/^\s*DELETE\s+FROM\s+(\S+)\s*$/', - 'DELETE FROM \1 WHERE 1=1', $query); - } - } - return $query; - } - - // }}} - // {{{ sqliteRaiseError() - - /** - * Produces a DB_Error object regarding the current problem - * - * @param int $errno if the error is being manually raised pass a - * DB_ERROR* constant here. If this isn't passed - * the error information gathered from the DBMS. - * - * @return object the DB_Error object - * - * @see DB_common::raiseError(), - * DB_sqlite::errorNative(), DB_sqlite::errorCode() - */ - function sqliteRaiseError($errno = null) - { - $native = $this->errorNative(); - if ($errno === null) { - $errno = $this->errorCode($native); - } - - $errorcode = @sqlite_last_error($this->connection); - $userinfo = "$errorcode ** $this->last_query"; - - return $this->raiseError($errno, null, null, $userinfo, $native); - } - - // }}} - // {{{ errorNative() - - /** - * Gets the DBMS' native error message produced by the last query - * - * {@internal This is used to retrieve more meaningfull error messages - * because sqlite_last_error() does not provide adequate info.}} - * - * @return string the DBMS' error message - */ - function errorNative() - { - return $this->_lasterror; - } - - // }}} - // {{{ errorCode() - - /** - * Determines PEAR::DB error code from the database's text error message - * - * @param string $errormsg the error message returned from the database - * - * @return integer the DB error number - */ - function errorCode($errormsg) - { - static $error_regexps; - if (!isset($error_regexps)) { - $error_regexps = array( - '/^no such table:/' => DB_ERROR_NOSUCHTABLE, - '/^no such index:/' => DB_ERROR_NOT_FOUND, - '/^(table|index) .* already exists$/' => DB_ERROR_ALREADY_EXISTS, - '/PRIMARY KEY must be unique/i' => DB_ERROR_CONSTRAINT, - '/is not unique/' => DB_ERROR_CONSTRAINT, - '/columns .* are not unique/i' => DB_ERROR_CONSTRAINT, - '/uniqueness constraint failed/' => DB_ERROR_CONSTRAINT, - '/may not be NULL/' => DB_ERROR_CONSTRAINT_NOT_NULL, - '/^no such column:/' => DB_ERROR_NOSUCHFIELD, - '/column not present in both tables/i' => DB_ERROR_NOSUCHFIELD, - '/^near ".*": syntax error$/' => DB_ERROR_SYNTAX, - '/[0-9]+ values for [0-9]+ columns/i' => DB_ERROR_VALUE_COUNT_ON_ROW, - ); - } - foreach ($error_regexps as $regexp => $code) { - if (preg_match($regexp, $errormsg)) { - return $code; - } - } - // Fall back to DB_ERROR if there was no mapping. - return DB_ERROR; - } - - // }}} - // {{{ tableInfo() - - /** - * Returns information about a table - * - * @param string $result a string containing the name of a table - * @param int $mode a valid tableInfo mode - * - * @return array an associative array with the information requested. - * A DB_Error object on failure. - * - * @see DB_common::tableInfo() - * @since Method available since Release 1.7.0 - */ - function tableInfo($result, $mode = null) - { - if (is_string($result)) { - /* - * Probably received a table name. - * Create a result resource identifier. - */ - $id = @sqlite_array_query($this->connection, - "PRAGMA table_info('$result');", - SQLITE_ASSOC); - $got_string = true; - } else { - $this->last_query = ''; - return $this->raiseError(DB_ERROR_NOT_CAPABLE, null, null, null, - 'This DBMS can not obtain tableInfo' . - ' from result sets'); - } - - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) { - $case_func = 'strtolower'; - } else { - $case_func = 'strval'; - } - - $count = count($id); - $res = array(); - - if ($mode) { - $res['num_fields'] = $count; - } - - for ($i = 0; $i < $count; $i++) { - if (strpos($id[$i]['type'], '(') !== false) { - $bits = explode('(', $id[$i]['type']); - $type = $bits[0]; - $len = rtrim($bits[1],')'); - } else { - $type = $id[$i]['type']; - $len = 0; - } - - $flags = ''; - if ($id[$i]['pk']) { - $flags .= 'primary_key '; - } - if ($id[$i]['notnull']) { - $flags .= 'not_null '; - } - if ($id[$i]['dflt_value'] !== null) { - $flags .= 'default_' . rawurlencode($id[$i]['dflt_value']); - } - $flags = trim($flags); - - $res[$i] = array( - 'table' => $case_func($result), - 'name' => $case_func($id[$i]['name']), - 'type' => $type, - 'len' => $len, - 'flags' => $flags, - ); - - if ($mode & DB_TABLEINFO_ORDER) { - $res['order'][$res[$i]['name']] = $i; - } - if ($mode & DB_TABLEINFO_ORDERTABLE) { - $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i; - } - } - - return $res; - } - - // }}} - // {{{ getSpecialQuery() - - /** - * Obtains the query string needed for listing a given type of objects - * - * @param string $type the kind of objects you want to retrieve - * @param array $args SQLITE DRIVER ONLY: a private array of arguments - * used by the getSpecialQuery(). Do not use - * this directly. - * - * @return string the SQL query string or null if the driver doesn't - * support the object type requested - * - * @access protected - * @see DB_common::getListOf() - */ - function getSpecialQuery($type, $args = array()) - { - if (!is_array($args)) { - return $this->raiseError('no key specified', null, null, null, - 'Argument has to be an array.'); - } - - switch ($type) { - case 'master': - return 'SELECT * FROM sqlite_master;'; - case 'tables': - return "SELECT name FROM sqlite_master WHERE type='table' " - . 'UNION ALL SELECT name FROM sqlite_temp_master ' - . "WHERE type='table' ORDER BY name;"; - case 'schema': - return 'SELECT sql FROM (SELECT * FROM sqlite_master ' - . 'UNION ALL SELECT * FROM sqlite_temp_master) ' - . "WHERE type!='meta' " - . 'ORDER BY tbl_name, type DESC, name;'; - case 'schemax': - case 'schema_x': - /* - * Use like: - * $res = $db->query($db->getSpecialQuery('schema_x', - * array('table' => 'table3'))); - */ - return 'SELECT sql FROM (SELECT * FROM sqlite_master ' - . 'UNION ALL SELECT * FROM sqlite_temp_master) ' - . "WHERE tbl_name LIKE '{$args['table']}' " - . "AND type!='meta' " - . 'ORDER BY type DESC, name;'; - case 'alter': - /* - * SQLite does not support ALTER TABLE; this is a helper query - * to handle this. 'table' represents the table name, 'rows' - * the news rows to create, 'save' the row(s) to keep _with_ - * the data. - * - * Use like: - * $args = array( - * 'table' => $table, - * 'rows' => "id INTEGER PRIMARY KEY, firstname TEXT, surname TEXT, datetime TEXT", - * 'save' => "NULL, titel, content, datetime" - * ); - * $res = $db->query( $db->getSpecialQuery('alter', $args)); - */ - $rows = strtr($args['rows'], $this->keywords); - - $q = array( - 'BEGIN TRANSACTION', - "CREATE TEMPORARY TABLE {$args['table']}_backup ({$args['rows']})", - "INSERT INTO {$args['table']}_backup SELECT {$args['save']} FROM {$args['table']}", - "DROP TABLE {$args['table']}", - "CREATE TABLE {$args['table']} ({$args['rows']})", - "INSERT INTO {$args['table']} SELECT {$rows} FROM {$args['table']}_backup", - "DROP TABLE {$args['table']}_backup", - 'COMMIT', - ); - - /* - * This is a dirty hack, since the above query will not get - * executed with a single query call so here the query method - * will be called directly and return a select instead. - */ - foreach ($q as $query) { - $this->query($query); - } - return "SELECT * FROM {$args['table']};"; - default: - return null; - } - } - - // }}} -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ - -?> diff --git a/program/lib/DB/storage.php b/program/lib/DB/storage.php deleted file mode 100644 index b97a4ad..0000000 --- a/program/lib/DB/storage.php +++ /dev/null @@ -1,504 +0,0 @@ - - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: storage.php 12 2005-10-02 11:36:35Z sparc $ - * @link http://pear.php.net/package/DB - */ - -/** - * Obtain the DB class so it can be extended from - */ -require_once 'DB.php'; - -/** - * Provides an object interface to a table row - * - * It lets you add, delete and change rows using objects rather than SQL - * statements. - * - * @category Database - * @package DB - * @author Stig Bakken - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - */ -class DB_storage extends PEAR -{ - // {{{ properties - - /** the name of the table (or view, if the backend database supports - updates in views) we hold data from */ - var $_table = null; - - /** which column(s) in the table contains primary keys, can be a - string for single-column primary keys, or an array of strings - for multiple-column primary keys */ - var $_keycolumn = null; - - /** DB connection handle used for all transactions */ - var $_dbh = null; - - /** an assoc with the names of database fields stored as properties - in this object */ - var $_properties = array(); - - /** an assoc with the names of the properties in this object that - have been changed since they were fetched from the database */ - var $_changes = array(); - - /** flag that decides if data in this object can be changed. - objects that don't have their table's key column in their - property lists will be flagged as read-only. */ - var $_readonly = false; - - /** function or method that implements a validator for fields that - are set, this validator function returns true if the field is - valid, false if not */ - var $_validator = null; - - // }}} - // {{{ constructor - - /** - * Constructor - * - * @param $table string the name of the database table - * - * @param $keycolumn mixed string with name of key column, or array of - * strings if the table has a primary key of more than one column - * - * @param $dbh object database connection object - * - * @param $validator mixed function or method used to validate - * each new value, called with three parameters: the name of the - * field/column that is changing, a reference to the new value and - * a reference to this object - * - */ - function DB_storage($table, $keycolumn, &$dbh, $validator = null) - { - $this->PEAR('DB_Error'); - $this->_table = $table; - $this->_keycolumn = $keycolumn; - $this->_dbh = $dbh; - $this->_readonly = false; - $this->_validator = $validator; - } - - // }}} - // {{{ _makeWhere() - - /** - * Utility method to build a "WHERE" clause to locate ourselves in - * the table. - * - * XXX future improvement: use rowids? - * - * @access private - */ - function _makeWhere($keyval = null) - { - if (is_array($this->_keycolumn)) { - if ($keyval === null) { - for ($i = 0; $i < sizeof($this->_keycolumn); $i++) { - $keyval[] = $this->{$this->_keycolumn[$i]}; - } - } - $whereclause = ''; - for ($i = 0; $i < sizeof($this->_keycolumn); $i++) { - if ($i > 0) { - $whereclause .= ' AND '; - } - $whereclause .= $this->_keycolumn[$i]; - if (is_null($keyval[$i])) { - // there's not much point in having a NULL key, - // but we support it anyway - $whereclause .= ' IS NULL'; - } else { - $whereclause .= ' = ' . $this->_dbh->quote($keyval[$i]); - } - } - } else { - if ($keyval === null) { - $keyval = @$this->{$this->_keycolumn}; - } - $whereclause = $this->_keycolumn; - if (is_null($keyval)) { - // there's not much point in having a NULL key, - // but we support it anyway - $whereclause .= ' IS NULL'; - } else { - $whereclause .= ' = ' . $this->_dbh->quote($keyval); - } - } - return $whereclause; - } - - // }}} - // {{{ setup() - - /** - * Method used to initialize a DB_storage object from the - * configured table. - * - * @param $keyval mixed the key[s] of the row to fetch (string or array) - * - * @return int DB_OK on success, a DB error if not - */ - function setup($keyval) - { - $whereclause = $this->_makeWhere($keyval); - $query = 'SELECT * FROM ' . $this->_table . ' WHERE ' . $whereclause; - $sth = $this->_dbh->query($query); - if (DB::isError($sth)) { - return $sth; - } - $row = $sth->fetchRow(DB_FETCHMODE_ASSOC); - if (DB::isError($row)) { - return $row; - } - if (!$row) { - return $this->raiseError(null, DB_ERROR_NOT_FOUND, null, null, - $query, null, true); - } - foreach ($row as $key => $value) { - $this->_properties[$key] = true; - $this->$key = $value; - } - return DB_OK; - } - - // }}} - // {{{ insert() - - /** - * Create a new (empty) row in the configured table for this - * object. - */ - function insert($newpk) - { - if (is_array($this->_keycolumn)) { - $primarykey = $this->_keycolumn; - } else { - $primarykey = array($this->_keycolumn); - } - settype($newpk, "array"); - for ($i = 0; $i < sizeof($primarykey); $i++) { - $pkvals[] = $this->_dbh->quote($newpk[$i]); - } - - $sth = $this->_dbh->query("INSERT INTO $this->_table (" . - implode(",", $primarykey) . ") VALUES(" . - implode(",", $pkvals) . ")"); - if (DB::isError($sth)) { - return $sth; - } - if (sizeof($newpk) == 1) { - $newpk = $newpk[0]; - } - $this->setup($newpk); - } - - // }}} - // {{{ toString() - - /** - * Output a simple description of this DB_storage object. - * @return string object description - */ - function toString() - { - $info = strtolower(get_class($this)); - $info .= " (table="; - $info .= $this->_table; - $info .= ", keycolumn="; - if (is_array($this->_keycolumn)) { - $info .= "(" . implode(",", $this->_keycolumn) . ")"; - } else { - $info .= $this->_keycolumn; - } - $info .= ", dbh="; - if (is_object($this->_dbh)) { - $info .= $this->_dbh->toString(); - } else { - $info .= "null"; - } - $info .= ")"; - if (sizeof($this->_properties)) { - $info .= " [loaded, key="; - $keyname = $this->_keycolumn; - if (is_array($keyname)) { - $info .= "("; - for ($i = 0; $i < sizeof($keyname); $i++) { - if ($i > 0) { - $info .= ","; - } - $info .= $this->$keyname[$i]; - } - $info .= ")"; - } else { - $info .= $this->$keyname; - } - $info .= "]"; - } - if (sizeof($this->_changes)) { - $info .= " [modified]"; - } - return $info; - } - - // }}} - // {{{ dump() - - /** - * Dump the contents of this object to "standard output". - */ - function dump() - { - foreach ($this->_properties as $prop => $foo) { - print "$prop = "; - print htmlentities($this->$prop); - print "
\n"; - } - } - - // }}} - // {{{ &create() - - /** - * Static method used to create new DB storage objects. - * @param $data assoc. array where the keys are the names - * of properties/columns - * @return object a new instance of DB_storage or a subclass of it - */ - function &create($table, &$data) - { - $classname = strtolower(get_class($this)); - $obj =& new $classname($table); - foreach ($data as $name => $value) { - $obj->_properties[$name] = true; - $obj->$name = &$value; - } - return $obj; - } - - // }}} - // {{{ loadFromQuery() - - /** - * Loads data into this object from the given query. If this - * object already contains table data, changes will be saved and - * the object re-initialized first. - * - * @param $query SQL query - * - * @param $params parameter list in case you want to use - * prepare/execute mode - * - * @return int DB_OK on success, DB_WARNING_READ_ONLY if the - * returned object is read-only (because the object's specified - * key column was not found among the columns returned by $query), - * or another DB error code in case of errors. - */ -// XXX commented out for now -/* - function loadFromQuery($query, $params = null) - { - if (sizeof($this->_properties)) { - if (sizeof($this->_changes)) { - $this->store(); - $this->_changes = array(); - } - $this->_properties = array(); - } - $rowdata = $this->_dbh->getRow($query, DB_FETCHMODE_ASSOC, $params); - if (DB::isError($rowdata)) { - return $rowdata; - } - reset($rowdata); - $found_keycolumn = false; - while (list($key, $value) = each($rowdata)) { - if ($key == $this->_keycolumn) { - $found_keycolumn = true; - } - $this->_properties[$key] = true; - $this->$key = &$value; - unset($value); // have to unset, or all properties will - // refer to the same value - } - if (!$found_keycolumn) { - $this->_readonly = true; - return DB_WARNING_READ_ONLY; - } - return DB_OK; - } - */ - - // }}} - // {{{ set() - - /** - * Modify an attriute value. - */ - function set($property, $newvalue) - { - // only change if $property is known and object is not - // read-only - if ($this->_readonly) { - return $this->raiseError(null, DB_WARNING_READ_ONLY, null, - null, null, null, true); - } - if (@isset($this->_properties[$property])) { - if (empty($this->_validator)) { - $valid = true; - } else { - $valid = @call_user_func($this->_validator, - $this->_table, - $property, - $newvalue, - $this->$property, - $this); - } - if ($valid) { - $this->$property = $newvalue; - if (empty($this->_changes[$property])) { - $this->_changes[$property] = 0; - } else { - $this->_changes[$property]++; - } - } else { - return $this->raiseError(null, DB_ERROR_INVALID, null, - null, "invalid field: $property", - null, true); - } - return true; - } - return $this->raiseError(null, DB_ERROR_NOSUCHFIELD, null, - null, "unknown field: $property", - null, true); - } - - // }}} - // {{{ &get() - - /** - * Fetch an attribute value. - * - * @param string attribute name - * - * @return attribute contents, or null if the attribute name is - * unknown - */ - function &get($property) - { - // only return if $property is known - if (isset($this->_properties[$property])) { - return $this->$property; - } - $tmp = null; - return $tmp; - } - - // }}} - // {{{ _DB_storage() - - /** - * Destructor, calls DB_storage::store() if there are changes - * that are to be kept. - */ - function _DB_storage() - { - if (sizeof($this->_changes)) { - $this->store(); - } - $this->_properties = array(); - $this->_changes = array(); - $this->_table = null; - } - - // }}} - // {{{ store() - - /** - * Stores changes to this object in the database. - * - * @return DB_OK or a DB error - */ - function store() - { - foreach ($this->_changes as $name => $foo) { - $params[] = &$this->$name; - $vars[] = $name . ' = ?'; - } - if ($vars) { - $query = 'UPDATE ' . $this->_table . ' SET ' . - implode(', ', $vars) . ' WHERE ' . - $this->_makeWhere(); - $stmt = $this->_dbh->prepare($query); - $res = $this->_dbh->execute($stmt, $params); - if (DB::isError($res)) { - return $res; - } - $this->_changes = array(); - } - return DB_OK; - } - - // }}} - // {{{ remove() - - /** - * Remove the row represented by this object from the database. - * - * @return mixed DB_OK or a DB error - */ - function remove() - { - if ($this->_readonly) { - return $this->raiseError(null, DB_WARNING_READ_ONLY, null, - null, null, null, true); - } - $query = 'DELETE FROM ' . $this->_table .' WHERE '. - $this->_makeWhere(); - $res = $this->_dbh->query($query); - if (DB::isError($res)) { - return $res; - } - foreach ($this->_properties as $prop => $foo) { - unset($this->$prop); - } - $this->_properties = array(); - $this->_changes = array(); - return DB_OK; - } - - // }}} -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ - -?> diff --git a/program/lib/DB/sybase.php b/program/lib/DB/sybase.php deleted file mode 100644 index 4bafb41..0000000 --- a/program/lib/DB/sybase.php +++ /dev/null @@ -1,907 +0,0 @@ - - * @author Antônio Carlos Venâncio Júnior - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: sybase.php 12 2005-10-02 11:36:35Z sparc $ - * @link http://pear.php.net/package/DB - */ - -/** - * Obtain the DB_common class so it can be extended from - */ -require_once 'DB/common.php'; - -/** - * The methods PEAR DB uses to interact with PHP's sybase extension - * for interacting with Sybase databases - * - * These methods overload the ones declared in DB_common. - * - * WARNING: This driver may fail with multiple connections under the - * same user/pass/host and different databases. - * - * @category Database - * @package DB - * @author Sterling Hughes - * @author Antônio Carlos Venâncio Júnior - * @author Daniel Convissor - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @package_version@ - * @link http://pear.php.net/package/DB - */ -class DB_sybase extends DB_common -{ - // {{{ properties - - /** - * The DB driver type (mysql, oci8, odbc, etc.) - * @var string - */ - var $phptype = 'sybase'; - - /** - * The database syntax variant to be used (db2, access, etc.), if any - * @var string - */ - var $dbsyntax = 'sybase'; - - /** - * The capabilities of this DB implementation - * - * The 'new_link' element contains the PHP version that first provided - * new_link support for this DBMS. Contains false if it's unsupported. - * - * Meaning of the 'limit' element: - * + 'emulate' = emulate with fetch row by number - * + 'alter' = alter the query - * + false = skip rows - * - * @var array - */ - var $features = array( - 'limit' => 'emulate', - 'new_link' => false, - 'numrows' => true, - 'pconnect' => true, - 'prepare' => false, - 'ssl' => false, - 'transactions' => true, - ); - - /** - * A mapping of native error codes to DB error codes - * @var array - */ - var $errorcode_map = array( - ); - - /** - * The raw database connection created by PHP - * @var resource - */ - var $connection; - - /** - * The DSN information for connecting to a database - * @var array - */ - var $dsn = array(); - - - /** - * Should data manipulation queries be committed automatically? - * @var bool - * @access private - */ - var $autocommit = true; - - /** - * The quantity of transactions begun - * - * {@internal While this is private, it can't actually be designated - * private in PHP 5 because it is directly accessed in the test suite.}} - * - * @var integer - * @access private - */ - var $transaction_opcount = 0; - - /** - * The database specified in the DSN - * - * It's a fix to allow calls to different databases in the same script. - * - * @var string - * @access private - */ - var $_db = ''; - - - // }}} - // {{{ constructor - - /** - * This constructor calls $this->DB_common() - * - * @return void - */ - function DB_sybase() - { - $this->DB_common(); - } - - // }}} - // {{{ connect() - - /** - * Connect to the database server, log in and open the database - * - * Don't call this method directly. Use DB::connect() instead. - * - * PEAR DB's sybase driver supports the following extra DSN options: - * + appname The application name to use on this connection. - * Available since PEAR DB 1.7.0. - * + charset The character set to use on this connection. - * Available since PEAR DB 1.7.0. - * - * @param array $dsn the data source name - * @param bool $persistent should the connection be persistent? - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function connect($dsn, $persistent = false) - { - if (!PEAR::loadExtension('sybase') && - !PEAR::loadExtension('sybase_ct')) - { - return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND); - } - - $this->dsn = $dsn; - if ($dsn['dbsyntax']) { - $this->dbsyntax = $dsn['dbsyntax']; - } - - $dsn['hostspec'] = $dsn['hostspec'] ? $dsn['hostspec'] : 'localhost'; - $dsn['password'] = !empty($dsn['password']) ? $dsn['password'] : false; - $dsn['charset'] = isset($dsn['charset']) ? $dsn['charset'] : false; - $dsn['appname'] = isset($dsn['appname']) ? $dsn['appname'] : false; - - $connect_function = $persistent ? 'sybase_pconnect' : 'sybase_connect'; - - if ($dsn['username']) { - $this->connection = @$connect_function($dsn['hostspec'], - $dsn['username'], - $dsn['password'], - $dsn['charset'], - $dsn['appname']); - } else { - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - 'The DSN did not contain a username.'); - } - - if (!$this->connection) { - return $this->raiseError(DB_ERROR_CONNECT_FAILED, - null, null, null, - @sybase_get_last_message()); - } - - if ($dsn['database']) { - if (!@sybase_select_db($dsn['database'], $this->connection)) { - return $this->raiseError(DB_ERROR_NODBSELECTED, - null, null, null, - @sybase_get_last_message()); - } - $this->_db = $dsn['database']; - } - - return DB_OK; - } - - // }}} - // {{{ disconnect() - - /** - * Disconnects from the database server - * - * @return bool TRUE on success, FALSE on failure - */ - function disconnect() - { - $ret = @sybase_close($this->connection); - $this->connection = null; - return $ret; - } - - // }}} - // {{{ simpleQuery() - - /** - * Sends a query to the database server - * - * @param string the SQL query string - * - * @return mixed + a PHP result resrouce for successful SELECT queries - * + the DB_OK constant for other successful queries - * + a DB_Error object on failure - */ - function simpleQuery($query) - { - $ismanip = DB::isManip($query); - $this->last_query = $query; - if (!@sybase_select_db($this->_db, $this->connection)) { - return $this->sybaseRaiseError(DB_ERROR_NODBSELECTED); - } - $query = $this->modifyQuery($query); - if (!$this->autocommit && $ismanip) { - if ($this->transaction_opcount == 0) { - $result = @sybase_query('BEGIN TRANSACTION', $this->connection); - if (!$result) { - return $this->sybaseRaiseError(); - } - } - $this->transaction_opcount++; - } - $result = @sybase_query($query, $this->connection); - if (!$result) { - return $this->sybaseRaiseError(); - } - if (is_resource($result)) { - return $result; - } - // Determine which queries that should return data, and which - // should return an error code only. - return $ismanip ? DB_OK : $result; - } - - // }}} - // {{{ nextResult() - - /** - * Move the internal sybase result pointer to the next available result - * - * @param a valid sybase result resource - * - * @access public - * - * @return true if a result is available otherwise return false - */ - function nextResult($result) - { - return false; - } - - // }}} - // {{{ fetchInto() - - /** - * Places a row from the result set into the given array - * - * Formating of the array and the data therein are configurable. - * See DB_result::fetchInto() for more information. - * - * This method is not meant to be called directly. Use - * DB_result::fetchInto() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result the query result resource - * @param array $arr the referenced array to put the data in - * @param int $fetchmode how the resulting array should be indexed - * @param int $rownum the row number to fetch (0 = first row) - * - * @return mixed DB_OK on success, NULL when the end of a result set is - * reached or on failure - * - * @see DB_result::fetchInto() - */ - function fetchInto($result, &$arr, $fetchmode, $rownum = null) - { - if ($rownum !== null) { - if (!@sybase_data_seek($result, $rownum)) { - return null; - } - } - if ($fetchmode & DB_FETCHMODE_ASSOC) { - if (function_exists('sybase_fetch_assoc')) { - $arr = @sybase_fetch_assoc($result); - } else { - if ($arr = @sybase_fetch_array($result)) { - foreach ($arr as $key => $value) { - if (is_int($key)) { - unset($arr[$key]); - } - } - } - } - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE && $arr) { - $arr = array_change_key_case($arr, CASE_LOWER); - } - } else { - $arr = @sybase_fetch_row($result); - } - if (!$arr) { - return null; - } - if ($this->options['portability'] & DB_PORTABILITY_RTRIM) { - $this->_rtrimArrayValues($arr); - } - if ($this->options['portability'] & DB_PORTABILITY_NULL_TO_EMPTY) { - $this->_convertNullArrayValuesToEmpty($arr); - } - return DB_OK; - } - - // }}} - // {{{ freeResult() - - /** - * Deletes the result set and frees the memory occupied by the result set - * - * This method is not meant to be called directly. Use - * DB_result::free() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return bool TRUE on success, FALSE if $result is invalid - * - * @see DB_result::free() - */ - function freeResult($result) - { - return @sybase_free_result($result); - } - - // }}} - // {{{ numCols() - - /** - * Gets the number of columns in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numCols() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of columns. A DB_Error object on failure. - * - * @see DB_result::numCols() - */ - function numCols($result) - { - $cols = @sybase_num_fields($result); - if (!$cols) { - return $this->sybaseRaiseError(); - } - return $cols; - } - - // }}} - // {{{ numRows() - - /** - * Gets the number of rows in a result set - * - * This method is not meant to be called directly. Use - * DB_result::numRows() instead. It can't be declared "protected" - * because DB_result is a separate object. - * - * @param resource $result PHP's query result resource - * - * @return int the number of rows. A DB_Error object on failure. - * - * @see DB_result::numRows() - */ - function numRows($result) - { - $rows = @sybase_num_rows($result); - if ($rows === false) { - return $this->sybaseRaiseError(); - } - return $rows; - } - - // }}} - // {{{ affectedRows() - - /** - * Determines the number of rows affected by a data maniuplation query - * - * 0 is returned for queries that don't manipulate data. - * - * @return int the number of rows. A DB_Error object on failure. - */ - function affectedRows() - { - if (DB::isManip($this->last_query)) { - $result = @sybase_affected_rows($this->connection); - } else { - $result = 0; - } - return $result; - } - - // }}} - // {{{ nextId() - - /** - * Returns the next free id in a sequence - * - * @param string $seq_name name of the sequence - * @param boolean $ondemand when true, the seqence is automatically - * created if it does not exist - * - * @return int the next id number in the sequence. - * A DB_Error object on failure. - * - * @see DB_common::nextID(), DB_common::getSequenceName(), - * DB_sybase::createSequence(), DB_sybase::dropSequence() - */ - function nextId($seq_name, $ondemand = true) - { - $seqname = $this->getSequenceName($seq_name); - if (!@sybase_select_db($this->_db, $this->connection)) { - return $this->sybaseRaiseError(DB_ERROR_NODBSELECTED); - } - $repeat = 0; - do { - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $result = $this->query("INSERT INTO $seqname (vapor) VALUES (0)"); - $this->popErrorHandling(); - if ($ondemand && DB::isError($result) && - ($result->getCode() == DB_ERROR || $result->getCode() == DB_ERROR_NOSUCHTABLE)) - { - $repeat = 1; - $result = $this->createSequence($seq_name); - if (DB::isError($result)) { - return $this->raiseError($result); - } - } elseif (!DB::isError($result)) { - $result =& $this->query("SELECT @@IDENTITY FROM $seqname"); - $repeat = 0; - } else { - $repeat = false; - } - } while ($repeat); - if (DB::isError($result)) { - return $this->raiseError($result); - } - $result = $result->fetchRow(DB_FETCHMODE_ORDERED); - return $result[0]; - } - - /** - * Creates a new sequence - * - * @param string $seq_name name of the new sequence - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::createSequence(), DB_common::getSequenceName(), - * DB_sybase::nextID(), DB_sybase::dropSequence() - */ - function createSequence($seq_name) - { - return $this->query('CREATE TABLE ' - . $this->getSequenceName($seq_name) - . ' (id numeric(10, 0) IDENTITY NOT NULL,' - . ' vapor int NULL)'); - } - - // }}} - // {{{ dropSequence() - - /** - * Deletes a sequence - * - * @param string $seq_name name of the sequence to be deleted - * - * @return int DB_OK on success. A DB_Error object on failure. - * - * @see DB_common::dropSequence(), DB_common::getSequenceName(), - * DB_sybase::nextID(), DB_sybase::createSequence() - */ - function dropSequence($seq_name) - { - return $this->query('DROP TABLE ' . $this->getSequenceName($seq_name)); - } - - // }}} - // {{{ autoCommit() - - /** - * Enables or disables automatic commits - * - * @param bool $onoff true turns it on, false turns it off - * - * @return int DB_OK on success. A DB_Error object if the driver - * doesn't support auto-committing transactions. - */ - function autoCommit($onoff = false) - { - // XXX if $this->transaction_opcount > 0, we should probably - // issue a warning here. - $this->autocommit = $onoff ? true : false; - return DB_OK; - } - - // }}} - // {{{ commit() - - /** - * Commits the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function commit() - { - if ($this->transaction_opcount > 0) { - if (!@sybase_select_db($this->_db, $this->connection)) { - return $this->sybaseRaiseError(DB_ERROR_NODBSELECTED); - } - $result = @sybase_query('COMMIT', $this->connection); - $this->transaction_opcount = 0; - if (!$result) { - return $this->sybaseRaiseError(); - } - } - return DB_OK; - } - - // }}} - // {{{ rollback() - - /** - * Reverts the current transaction - * - * @return int DB_OK on success. A DB_Error object on failure. - */ - function rollback() - { - if ($this->transaction_opcount > 0) { - if (!@sybase_select_db($this->_db, $this->connection)) { - return $this->sybaseRaiseError(DB_ERROR_NODBSELECTED); - } - $result = @sybase_query('ROLLBACK', $this->connection); - $this->transaction_opcount = 0; - if (!$result) { - return $this->sybaseRaiseError(); - } - } - return DB_OK; - } - - // }}} - // {{{ sybaseRaiseError() - - /** - * Produces a DB_Error object regarding the current problem - * - * @param int $errno if the error is being manually raised pass a - * DB_ERROR* constant here. If this isn't passed - * the error information gathered from the DBMS. - * - * @return object the DB_Error object - * - * @see DB_common::raiseError(), - * DB_sybase::errorNative(), DB_sybase::errorCode() - */ - function sybaseRaiseError($errno = null) - { - $native = $this->errorNative(); - if ($errno === null) { - $errno = $this->errorCode($native); - } - return $this->raiseError($errno, null, null, null, $native); - } - - // }}} - // {{{ errorNative() - - /** - * Gets the DBMS' native error message produced by the last query - * - * @return string the DBMS' error message - */ - function errorNative() - { - return @sybase_get_last_message(); - } - - // }}} - // {{{ errorCode() - - /** - * Determines PEAR::DB error code from the database's text error message. - * - * @param string $errormsg error message returned from the database - * @return integer an error number from a DB error constant - */ - function errorCode($errormsg) - { - static $error_regexps; - if (!isset($error_regexps)) { - $error_regexps = array( - '/Incorrect syntax near/' - => DB_ERROR_SYNTAX, - '/^Unclosed quote before the character string [\"\'].*[\"\']\./' - => DB_ERROR_SYNTAX, - '/Implicit conversion (from datatype|of NUMERIC value)/i' - => DB_ERROR_INVALID_NUMBER, - '/Cannot drop the table [\"\'].+[\"\'], because it doesn\'t exist in the system catalogs\./' - => DB_ERROR_NOSUCHTABLE, - '/Only the owner of object [\"\'].+[\"\'] or a user with System Administrator \(SA\) role can run this command\./' - => DB_ERROR_ACCESS_VIOLATION, - '/^.+ permission denied on object .+, database .+, owner .+/' - => DB_ERROR_ACCESS_VIOLATION, - '/^.* permission denied, database .+, owner .+/' - => DB_ERROR_ACCESS_VIOLATION, - '/[^.*] not found\./' - => DB_ERROR_NOSUCHTABLE, - '/There is already an object named/' - => DB_ERROR_ALREADY_EXISTS, - '/Invalid column name/' - => DB_ERROR_NOSUCHFIELD, - '/does not allow null values/' - => DB_ERROR_CONSTRAINT_NOT_NULL, - '/Command has been aborted/' - => DB_ERROR_CONSTRAINT, - '/^Cannot drop the index .* because it doesn\'t exist/i' - => DB_ERROR_NOT_FOUND, - '/^There is already an index/i' - => DB_ERROR_ALREADY_EXISTS, - '/^There are fewer columns in the INSERT statement than values specified/i' - => DB_ERROR_VALUE_COUNT_ON_ROW, - ); - } - - foreach ($error_regexps as $regexp => $code) { - if (preg_match($regexp, $errormsg)) { - return $code; - } - } - return DB_ERROR; - } - - // }}} - // {{{ tableInfo() - - /** - * Returns information about a table or a result set - * - * NOTE: only supports 'table' and 'flags' if $result - * is a table name. - * - * @param object|string $result DB_result object from a query or a - * string containing the name of a table. - * While this also accepts a query result - * resource identifier, this behavior is - * deprecated. - * @param int $mode a valid tableInfo mode - * - * @return array an associative array with the information requested. - * A DB_Error object on failure. - * - * @see DB_common::tableInfo() - * @since Method available since Release 1.6.0 - */ - function tableInfo($result, $mode = null) - { - if (is_string($result)) { - /* - * Probably received a table name. - * Create a result resource identifier. - */ - if (!@sybase_select_db($this->_db, $this->connection)) { - return $this->sybaseRaiseError(DB_ERROR_NODBSELECTED); - } - $id = @sybase_query("SELECT * FROM $result WHERE 1=0", - $this->connection); - $got_string = true; - } elseif (isset($result->result)) { - /* - * Probably received a result object. - * Extract the result resource identifier. - */ - $id = $result->result; - $got_string = false; - } else { - /* - * Probably received a result resource identifier. - * Copy it. - * Deprecated. Here for compatibility only. - */ - $id = $result; - $got_string = false; - } - - if (!is_resource($id)) { - return $this->sybaseRaiseError(DB_ERROR_NEED_MORE_DATA); - } - - if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) { - $case_func = 'strtolower'; - } else { - $case_func = 'strval'; - } - - $count = @sybase_num_fields($id); - $res = array(); - - if ($mode) { - $res['num_fields'] = $count; - } - - for ($i = 0; $i < $count; $i++) { - $f = @sybase_fetch_field($id, $i); - // column_source is often blank - $res[$i] = array( - 'table' => $got_string - ? $case_func($result) - : $case_func($f->column_source), - 'name' => $case_func($f->name), - 'type' => $f->type, - 'len' => $f->max_length, - 'flags' => '', - ); - if ($res[$i]['table']) { - $res[$i]['flags'] = $this->_sybase_field_flags( - $res[$i]['table'], $res[$i]['name']); - } - if ($mode & DB_TABLEINFO_ORDER) { - $res['order'][$res[$i]['name']] = $i; - } - if ($mode & DB_TABLEINFO_ORDERTABLE) { - $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i; - } - } - - // free the result only if we were called on a table - if ($got_string) { - @sybase_free_result($id); - } - return $res; - } - - // }}} - // {{{ _sybase_field_flags() - - /** - * Get the flags for a field - * - * Currently supports: - * + unique_key (unique index, unique check or primary_key) - * + multiple_key (multi-key index) - * - * @param string $table the table name - * @param string $column the field name - * - * @return string space delimited string of flags. Empty string if none. - * - * @access private - */ - function _sybase_field_flags($table, $column) - { - static $tableName = null; - static $flags = array(); - - if ($table != $tableName) { - $flags = array(); - $tableName = $table; - - // get unique/primary keys - $res = $this->getAll("sp_helpindex $table", DB_FETCHMODE_ASSOC); - - if (!isset($res[0]['index_description'])) { - return ''; - } - - foreach ($res as $val) { - $keys = explode(', ', trim($val['index_keys'])); - - if (sizeof($keys) > 1) { - foreach ($keys as $key) { - $this->_add_flag($flags[$key], 'multiple_key'); - } - } - - if (strpos($val['index_description'], 'unique')) { - foreach ($keys as $key) { - $this->_add_flag($flags[$key], 'unique_key'); - } - } - } - - } - - if (array_key_exists($column, $flags)) { - return(implode(' ', $flags[$column])); - } - - return ''; - } - - // }}} - // {{{ _add_flag() - - /** - * Adds a string to the flags array if the flag is not yet in there - * - if there is no flag present the array is created - * - * @param array $array reference of flags array to add a value to - * @param mixed $value value to add to the flag array - * - * @return void - * - * @access private - */ - function _add_flag(&$array, $value) - { - if (!is_array($array)) { - $array = array($value); - } elseif (!in_array($value, $array)) { - array_push($array, $value); - } - } - - // }}} - // {{{ getSpecialQuery() - - /** - * Obtains the query string needed for listing a given type of objects - * - * @param string $type the kind of objects you want to retrieve - * - * @return string the SQL query string or null if the driver doesn't - * support the object type requested - * - * @access protected - * @see DB_common::getListOf() - */ - function getSpecialQuery($type) - { - switch ($type) { - case 'tables': - return "SELECT name FROM sysobjects WHERE type = 'U'" - . ' ORDER BY name'; - case 'views': - return "SELECT name FROM sysobjects WHERE type = 'V'"; - default: - return null; - } - } - - // }}} - -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ - -?> diff --git a/program/lib/Mail/mime.php b/program/lib/Mail/mime.php deleted file mode 100644 index 724fa6d..0000000 --- a/program/lib/Mail/mime.php +++ /dev/null @@ -1,1005 +0,0 @@ - - * Copyright (c) 2003-2006, PEAR - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - Neither the name of the authors, nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * - * @category Mail - * @package Mail_Mime - * @author Richard Heyes - * @author Tomas V.V. Cox - * @author Cipriano Groenendal - * @author Sean Coates - * @copyright 2003-2006 PEAR - * @license http://www.opensource.org/licenses/bsd-license.php BSD License - * @version CVS: $Id: mime.php 514 2007-03-21 09:54:10Z thomasb $ - * @link http://pear.php.net/package/Mail_mime - * @notes This class is based on HTML Mime Mail class from - * Richard Heyes which was based also - * in the mime_mail.class by Tobias Ratschiller - * and Sascha Schumann - */ - - -/** - * require PEAR - * - * This package depends on PEAR to raise errors. - */ -require_once('PEAR.php'); - -/** - * require Mail_mimePart - * - * Mail_mimePart contains the code required to - * create all the different parts a mail can - * consist of. - */ -require_once('Mail/mimePart.php'); - - -/** - * The Mail_Mime class provides an OO interface to create MIME - * enabled email messages. This way you can create emails that - * contain plain-text bodies, HTML bodies, attachments, inline - * images and specific headers. - * - * @category Mail - * @package Mail_Mime - * @author Richard Heyes - * @author Tomas V.V. Cox - * @author Cipriano Groenendal - * @author Sean Coates - * @copyright 2003-2006 PEAR - * @license http://www.opensource.org/licenses/bsd-license.php BSD License - * @version Release: @package_version@ - * @link http://pear.php.net/package/Mail_mime - */ -class Mail_mime -{ - /** - * Contains the plain text part of the email - * - * @var string - * @access private - */ - var $_txtbody; - - /** - * Contains the html part of the email - * - * @var string - * @access private - */ - var $_htmlbody; - - /** - * contains the mime encoded text - * - * @var string - * @access private - */ - var $_mime; - - /** - * contains the multipart content - * - * @var string - * @access private - */ - var $_multipart; - - /** - * list of the attached images - * - * @var array - * @access private - */ - var $_html_images = array(); - - /** - * list of the attachements - * - * @var array - * @access private - */ - var $_parts = array(); - - /** - * Build parameters - * - * @var array - * @access private - */ - var $_build_params = array(); - - /** - * Headers for the mail - * - * @var array - * @access private - */ - var $_headers = array(); - - /** - * End Of Line sequence (for serialize) - * - * @var string - * @access private - */ - var $_eol; - - - /** - * Constructor function. - * - * @param string $crlf what type of linebreak to use. - * Defaults to "\r\n" - * @return void - * - * @access public - */ - function Mail_mime($crlf = "\r\n") - { - $this->_setEOL($crlf); - $this->_build_params = array( - 'head_encoding' => 'quoted-printable', - 'text_encoding' => '7bit', - 'html_encoding' => 'quoted-printable', - '7bit_wrap' => 998, - 'html_charset' => 'ISO-8859-1', - 'text_charset' => 'ISO-8859-1', - 'head_charset' => 'ISO-8859-1' - ); - } - - /** - * wakeup function called by unserialize. It re-sets the EOL constant - * - * @access private - */ - function __wakeup() - { - $this->_setEOL($this->_eol); - } - - - /** - * Accessor function to set the body text. Body text is used if - * it's not an html mail being sent or else is used to fill the - * text/plain part that emails clients who don't support - * html should show. - * - * @param string $data Either a string or - * the file name with the contents - * @param bool $isfile If true the first param should be treated - * as a file name, else as a string (default) - * @param bool $append If true the text or file is appended to - * the existing body, else the old body is - * overwritten - * @return mixed true on success or PEAR_Error object - * @access public - */ - function setTXTBody($data, $isfile = false, $append = false) - { - if (!$isfile) { - if (!$append) { - $this->_txtbody = $data; - } else { - $this->_txtbody .= $data; - } - } else { - $cont = $this->_file2str($data); - if (PEAR::isError($cont)) { - return $cont; - } - if (!$append) { - $this->_txtbody = $cont; - } else { - $this->_txtbody .= $cont; - } - } - return true; - } - - /** - * Adds a html part to the mail. - * - * @param string $data either a string or the file name with the - * contents - * @param bool $isfile a flag that determines whether $data is a - * filename, or a string(false, default) - * @return bool true on success - * @access public - */ - function setHTMLBody($data, $isfile = false) - { - if (!$isfile) { - $this->_htmlbody = $data; - } else { - $cont = $this->_file2str($data); - if (PEAR::isError($cont)) { - return $cont; - } - $this->_htmlbody = $cont; - } - - return true; - } - - /** - * Adds an image to the list of embedded images. - * - * @param string $file the image file name OR image data itself - * @param string $c_type the content type - * @param string $name the filename of the image. - * Only use if $file is the image data. - * @param bool $isfile whether $file is a filename or not. - * Defaults to true - * @return bool true on success - * @access public - */ - function addHTMLImage($file, $c_type='application/octet-stream', - $name = '', $isfile = true) - { - $filedata = ($isfile === true) ? $this->_file2str($file) - : $file; - if ($isfile === true) { - $filename = ($name == '' ? $file : $name); - } else { - $filename = $name; - } - if (PEAR::isError($filedata)) { - return $filedata; - } - $this->_html_images[] = array( - 'body' => $filedata, - 'name' => $filename, - 'c_type' => $c_type, - 'cid' => md5(uniqid(time())) - ); - return true; - } - - /** - * Adds a file to the list of attachments. - * - * @param string $file The file name of the file to attach - * OR the file contents itself - * @param string $c_type The content type - * @param string $name The filename of the attachment - * Only use if $file is the contents - * @param bool $isfile Whether $file is a filename or not - * Defaults to true - * @param string $encoding The type of encoding to use. - * Defaults to base64. - * Possible values: 7bit, 8bit, base64, - * or quoted-printable. - * @param string $disposition The content-disposition of this file - * Defaults to attachment. - * Possible values: attachment, inline. - * @param string $charset The character set used in the filename - * of this attachment. - * @return mixed true on success or PEAR_Error object - * @access public - */ - function addAttachment($file, $c_type = 'application/octet-stream', - $name = '', $isfile = true, - $encoding = 'base64', - $disposition = 'attachment', $charset = '') - { - $filedata = ($isfile === true) ? $this->_file2str($file) - : $file; - if ($isfile === true) { - // Force the name the user supplied, otherwise use $file - $filename = (!empty($name)) ? $name : $file; - } else { - $filename = $name; - } - if (empty($filename)) { - $err = PEAR::raiseError( - "The supplied filename for the attachment can't be empty" - ); - return $err; - } - $filename = basename($filename); - if (PEAR::isError($filedata)) { - return $filedata; - } - - $this->_parts[] = array( - 'body' => $filedata, - 'name' => $filename, - 'c_type' => $c_type, - 'encoding' => $encoding, - 'charset' => $charset, - 'disposition' => $disposition - ); - return true; - } - - /** - * Get the contents of the given file name as string - * - * @param string $file_name path of file to process - * @return string contents of $file_name - * @access private - */ - function &_file2str($file_name) - { - if (!is_readable($file_name)) { - $err = PEAR::raiseError('File is not readable ' . $file_name); - return $err; - } - if (!$fd = fopen($file_name, 'rb')) { - $err = PEAR::raiseError('Could not open ' . $file_name); - return $err; - } - $filesize = filesize($file_name); - if ($filesize == 0){ - $cont = ""; - }else{ - if ($magic_quote_setting = get_magic_quotes_runtime()){ - set_magic_quotes_runtime(0); - } - $cont = fread($fd, $filesize); - if ($magic_quote_setting){ - set_magic_quotes_runtime($magic_quote_setting); - } - } - fclose($fd); - return $cont; - } - - /** - * Adds a text subpart to the mimePart object and - * returns it during the build process. - * - * @param mixed The object to add the part to, or - * null if a new object is to be created. - * @param string The text to add. - * @return object The text mimePart object - * @access private - */ - function &_addTextPart(&$obj, $text) - { - $params['content_type'] = 'text/plain'; - $params['encoding'] = $this->_build_params['text_encoding']; - $params['charset'] = $this->_build_params['text_charset']; - if (is_object($obj)) { - $ret = $obj->addSubpart($text, $params); - return $ret; - } else { - $ret = new Mail_mimePart($text, $params); - return $ret; - } - } - - /** - * Adds a html subpart to the mimePart object and - * returns it during the build process. - * - * @param mixed The object to add the part to, or - * null if a new object is to be created. - * @return object The html mimePart object - * @access private - */ - function &_addHtmlPart(&$obj) - { - $params['content_type'] = 'text/html'; - $params['encoding'] = $this->_build_params['html_encoding']; - $params['charset'] = $this->_build_params['html_charset']; - if (is_object($obj)) { - $ret = $obj->addSubpart($this->_htmlbody, $params); - return $ret; - } else { - $ret = new Mail_mimePart($this->_htmlbody, $params); - return $ret; - } - } - - /** - * Creates a new mimePart object, using multipart/mixed as - * the initial content-type and returns it during the - * build process. - * - * @return object The multipart/mixed mimePart object - * @access private - */ - function &_addMixedPart() - { - $params['content_type'] = 'multipart/mixed'; - $ret = new Mail_mimePart('', $params); - return $ret; - } - - /** - * Adds a multipart/alternative part to a mimePart - * object (or creates one), and returns it during - * the build process. - * - * @param mixed The object to add the part to, or - * null if a new object is to be created. - * @return object The multipart/mixed mimePart object - * @access private - */ - function &_addAlternativePart(&$obj) - { - $params['content_type'] = 'multipart/alternative'; - if (is_object($obj)) { - return $obj->addSubpart('', $params); - } else { - $ret = new Mail_mimePart('', $params); - return $ret; - } - } - - /** - * Adds a multipart/related part to a mimePart - * object (or creates one), and returns it during - * the build process. - * - * @param mixed The object to add the part to, or - * null if a new object is to be created - * @return object The multipart/mixed mimePart object - * @access private - */ - function &_addRelatedPart(&$obj) - { - $params['content_type'] = 'multipart/related'; - if (is_object($obj)) { - return $obj->addSubpart('', $params); - } else { - $ret = new Mail_mimePart('', $params); - return $ret; - } - } - - /** - * Adds an html image subpart to a mimePart object - * and returns it during the build process. - * - * @param object The mimePart to add the image to - * @param array The image information - * @return object The image mimePart object - * @access private - */ - function &_addHtmlImagePart(&$obj, $value) - { - $params['content_type'] = $value['c_type'] . '; ' . - 'name="' . $value['name'] . '"'; - $params['encoding'] = 'base64'; - $params['disposition'] = 'inline'; - $params['dfilename'] = $value['name']; - $params['cid'] = $value['cid']; - $ret = $obj->addSubpart($value['body'], $params); - return $ret; - - } - - /** - * Adds an attachment subpart to a mimePart object - * and returns it during the build process. - * - * @param object The mimePart to add the image to - * @param array The attachment information - * @return object The image mimePart object - * @access private - */ - function &_addAttachmentPart(&$obj, $value) - { - $params['dfilename'] = $value['name']; - $params['encoding'] = $value['encoding']; - if ($value['disposition'] != "inline") { - $fname = array("fname" => $value['name']); - $fname_enc = $this->_encodeHeaders($fname, array('head_charset' => $value['charset'] ? $value['charset'] : 'iso-8859-1')); - $params['dfilename'] = $fname_enc['fname']; - } - if ($value['charset']) { - $params['charset'] = $value['charset']; - } - $params['content_type'] = $value['c_type'] . '; ' . - 'name="' . $params['dfilename'] . '"'; - $params['disposition'] = isset($value['disposition']) ? - $value['disposition'] : 'attachment'; - $ret = $obj->addSubpart($value['body'], $params); - return $ret; - } - - /** - * Returns the complete e-mail, ready to send using an alternative - * mail delivery method. Note that only the mailpart that is made - * with Mail_Mime is created. This means that, - * YOU WILL HAVE NO TO: HEADERS UNLESS YOU SET IT YOURSELF - * using the $xtra_headers parameter! - * - * @param string $separation The separation etween these two parts. - * @param array $build_params The Build parameters passed to the - * &get() function. See &get for more info. - * @param array $xtra_headers The extra headers that should be passed - * to the &headers() function. - * See that function for more info. - * @param bool $overwrite Overwrite the existing headers with new. - * @return string The complete e-mail. - * @access public - */ - function getMessage($separation = null, $build_params = null, $xtra_headers = null, $overwrite = false) - { - if ($separation === null) - { - $separation = MAIL_MIME_CRLF; - } - $body = $this->get($build_params); - $head = $this->txtHeaders($xtra_headers, $overwrite); - $mail = $head . $separation . $body; - return $mail; - } - - - /** - * Builds the multipart message from the list ($this->_parts) and - * returns the mime content. - * - * @param array Build parameters that change the way the email - * is built. Should be associative. Can contain: - * head_encoding - What encoding to use for the headers. - * Options: quoted-printable or base64 - * Default is quoted-printable - * text_encoding - What encoding to use for plain text - * Options: 7bit, 8bit, base64, or quoted-printable - * Default is 7bit - * html_encoding - What encoding to use for html - * Options: 7bit, 8bit, base64, or quoted-printable - * Default is quoted-printable - * 7bit_wrap - Number of characters before text is - * wrapped in 7bit encoding - * Default is 998 - * html_charset - The character set to use for html. - * Default is iso-8859-1 - * text_charset - The character set to use for text. - * Default is iso-8859-1 - * head_charset - The character set to use for headers. - * Default is iso-8859-1 - * @return string The mime content - * @access public - */ - function &get($build_params = null) - { - if (isset($build_params)) { - while (list($key, $value) = each($build_params)) { - $this->_build_params[$key] = $value; - } - } - - if (!empty($this->_html_images) AND isset($this->_htmlbody)) { - foreach ($this->_html_images as $key => $value) { - $regex = array(); - $regex[] = '#(\s)((?i)src|background|href(?-i))\s*=\s*(["\']?)' . - preg_quote($value['name'], '#') . '\3#'; - $regex[] = '#(?i)url(?-i)\(\s*(["\']?)' . - preg_quote($value['name'], '#') . '\1\s*\)#'; - $rep = array(); - $rep[] = '\1\2=\3cid:' . $value['cid'] .'\3'; - $rep[] = 'url(\1cid:' . $value['cid'] . '\2)'; - $this->_htmlbody = preg_replace($regex, $rep, - $this->_htmlbody - ); - $this->_html_images[$key]['name'] = basename($this->_html_images[$key]['name']); - } - } - - $null = null; - $attachments = !empty($this->_parts) ? true : false; - $html_images = !empty($this->_html_images) ? true : false; - $html = !empty($this->_htmlbody) ? true : false; - $text = (!$html AND !empty($this->_txtbody)) ? true : false; - - switch (true) { - case $text AND !$attachments: - $message =& $this->_addTextPart($null, $this->_txtbody); - break; - - case !$text AND !$html AND $attachments: - $message =& $this->_addMixedPart(); - for ($i = 0; $i < count($this->_parts); $i++) { - $this->_addAttachmentPart($message, $this->_parts[$i]); - } - break; - - case $text AND $attachments: - $message =& $this->_addMixedPart(); - $this->_addTextPart($message, $this->_txtbody); - for ($i = 0; $i < count($this->_parts); $i++) { - $this->_addAttachmentPart($message, $this->_parts[$i]); - } - break; - - case $html AND !$attachments AND !$html_images: - if (isset($this->_txtbody)) { - $message =& $this->_addAlternativePart($null); - $this->_addTextPart($message, $this->_txtbody); - $this->_addHtmlPart($message); - } else { - $message =& $this->_addHtmlPart($null); - } - break; - - case $html AND !$attachments AND $html_images: - if (isset($this->_txtbody)) { - $message =& $this->_addAlternativePart($null); - $this->_addTextPart($message, $this->_txtbody); - $related =& $this->_addRelatedPart($message); - } else { - $message =& $this->_addRelatedPart($null); - $related =& $message; - } - $this->_addHtmlPart($related); - for ($i = 0; $i < count($this->_html_images); $i++) { - $this->_addHtmlImagePart($related, $this->_html_images[$i]); - } - break; - - case $html AND $attachments AND !$html_images: - $message =& $this->_addMixedPart(); - if (isset($this->_txtbody)) { - $alt =& $this->_addAlternativePart($message); - $this->_addTextPart($alt, $this->_txtbody); - $this->_addHtmlPart($alt); - } else { - $this->_addHtmlPart($message); - } - for ($i = 0; $i < count($this->_parts); $i++) { - $this->_addAttachmentPart($message, $this->_parts[$i]); - } - break; - - case $html AND $attachments AND $html_images: - $message =& $this->_addMixedPart(); - if (isset($this->_txtbody)) { - $alt =& $this->_addAlternativePart($message); - $this->_addTextPart($alt, $this->_txtbody); - $rel =& $this->_addRelatedPart($alt); - } else { - $rel =& $this->_addRelatedPart($message); - } - $this->_addHtmlPart($rel); - for ($i = 0; $i < count($this->_html_images); $i++) { - $this->_addHtmlImagePart($rel, $this->_html_images[$i]); - } - for ($i = 0; $i < count($this->_parts); $i++) { - $this->_addAttachmentPart($message, $this->_parts[$i]); - } - break; - - } - - if (isset($message)) { - $output = $message->encode(); - $this->_headers = array_merge($this->_headers, - $output['headers']); - $body = $output['body']; - return $body; - - } else { - $ret = false; - return $ret; - } - } - - /** - * Returns an array with the headers needed to prepend to the email - * (MIME-Version and Content-Type). Format of argument is: - * $array['header-name'] = 'header-value'; - * - * @param array $xtra_headers Assoc array with any extra headers. - * Optional. - * @param bool $overwrite Overwrite already existing headers. - * @return array Assoc array with the mime headers - * @access public - */ - function &headers($xtra_headers = null, $overwrite = false) - { - // Content-Type header should already be present, - // So just add mime version header - $headers['MIME-Version'] = '1.0'; - if (isset($xtra_headers)) { - $headers = array_merge($headers, $xtra_headers); - } - if ($overwrite){ - $this->_headers = array_merge($this->_headers, $headers); - }else{ - $this->_headers = array_merge($headers, $this->_headers); - } - - $encodedHeaders = $this->_encodeHeaders($this->_headers); - return $encodedHeaders; - } - - /** - * Get the text version of the headers - * (usefull if you want to use the PHP mail() function) - * - * @param array $xtra_headers Assoc array with any extra headers. - * Optional. - * @param bool $overwrite Overwrite the existing heaers with new. - * @return string Plain text headers - * @access public - */ - function txtHeaders($xtra_headers = null, $overwrite = false) - { - $headers = $this->headers($xtra_headers, $overwrite); - $ret = ''; - foreach ($headers as $key => $val) { - $ret .= "$key: $val" . MAIL_MIME_CRLF; - } - return $ret; - } - - /** - * Sets the Subject header - * - * @param string $subject String to set the subject to - * access public - */ - function setSubject($subject) - { - $this->_headers['Subject'] = $subject; - } - - /** - * Set an email to the From (the sender) header - * - * @param string $email The email direction to add - * @access public - */ - function setFrom($email) - { - $this->_headers['From'] = $email; - } - - /** - * Add an email to the Cc (carbon copy) header - * (multiple calls to this method are allowed) - * - * @param string $email The email direction to add - * @access public - */ - function addCc($email) - { - if (isset($this->_headers['Cc'])) { - $this->_headers['Cc'] .= ", $email"; - } else { - $this->_headers['Cc'] = $email; - } - } - - /** - * Add an email to the Bcc (blank carbon copy) header - * (multiple calls to this method are allowed) - * - * @param string $email The email direction to add - * @access public - */ - function addBcc($email) - { - if (isset($this->_headers['Bcc'])) { - $this->_headers['Bcc'] .= ", $email"; - } else { - $this->_headers['Bcc'] = $email; - } - } - - /** - * Since the PHP send function requires you to specifiy - * recipients (To: header) separately from the other - * headers, the To: header is not properly encoded. - * To fix this, you can use this public method to - * encode your recipients before sending to the send - * function - * - * @param string $recipients A comma-delimited list of recipients - * @return string Encoded data - * @access public - */ - function encodeRecipients($recipients) - { - $input = array("To" => $recipients); - $retval = $this->_encodeHeaders($input); - return $retval["To"] ; - } - - /** - * Encodes a header as per RFC2047 - * - * @param array $input The header data to encode - * @param array $params Extra build parameters - * @return array Encoded data - * @access private - */ - function _encodeHeaders($input, $params = array()) - { - - $build_params = $this->_build_params; - while (list($key, $value) = each($params)) { - $build_params[$key] = $value; - } - - foreach ($input as $hdr_name => $hdr_value) { - $hdr_vals = preg_split("|(\s)|", $hdr_value, -1, PREG_SPLIT_DELIM_CAPTURE); - $hdr_value_out=""; - $previous = ""; - foreach ($hdr_vals as $hdr_val){ - if (!trim($hdr_val)){ - //whitespace needs to be handled with another string, or it - //won't show between encoded strings. Prepend this to the next item. - $previous .= $hdr_val; - continue; - }else{ - $hdr_val = $previous . $hdr_val; - $previous = ""; - } - if (function_exists('iconv_mime_encode') && preg_match('#[\x80-\xFF]{1}#', $hdr_val)){ - $imePref = array(); - if ($build_params['head_encoding'] == 'base64'){ - $imePrefs['scheme'] = 'B'; - }else{ - $imePrefs['scheme'] = 'Q'; - } - $imePrefs['input-charset'] = $build_params['head_charset']; - $imePrefs['output-charset'] = $build_params['head_charset']; - $hdr_val = iconv_mime_encode($hdr_name, $hdr_val, $imePrefs); - $hdr_val = preg_replace("#^{$hdr_name}\:\ #", "", $hdr_val); - }elseif (preg_match('#[\x80-\xFF]{1}#', $hdr_val)){ - //This header contains non ASCII chars and should be encoded. - switch ($build_params['head_encoding']) { - case 'base64': - //Base64 encoding has been selected. - - //Generate the header using the specified params and dynamicly - //determine the maximum length of such strings. - //75 is the value specified in the RFC. The first -2 is there so - //the later regexp doesn't break any of the translated chars. - //The -2 on the first line-regexp is to compensate for the ": " - //between the header-name and the header value - $prefix = '=?' . $build_params['head_charset'] . '?B?'; - $suffix = '?='; - $maxLength = 75 - strlen($prefix . $suffix) - 2; - $maxLength1stLine = $maxLength - strlen($hdr_name) - 2; - - //Base64 encode the entire string - $hdr_val = base64_encode($hdr_val); - - //This regexp will break base64-encoded text at every - //$maxLength but will not break any encoded letters. - $reg1st = "|.{0,$maxLength1stLine}[^\=][^\=]|"; - $reg2nd = "|.{0,$maxLength}[^\=][^\=]|"; - break; - case 'quoted-printable': - default: - //quoted-printable encoding has been selected - - //Generate the header using the specified params and dynamicly - //determine the maximum length of such strings. - //75 is the value specified in the RFC. The -2 is there so - //the later regexp doesn't break any of the translated chars. - //The -2 on the first line-regexp is to compensate for the ": " - //between the header-name and the header value - $prefix = '=?' . $build_params['head_charset'] . '?Q?'; - $suffix = '?='; - $maxLength = 75 - strlen($prefix . $suffix) - 2; - $maxLength1stLine = $maxLength - strlen($hdr_name) - 2; - - //Replace all special characters used by the encoder. - $search = array("=", "_", "?", " "); - $replace = array("=3D", "=5F", "=3F", "_"); - $hdr_val = str_replace($search, $replace, $hdr_val); - - //Replace all extended characters (\x80-xFF) with their - //ASCII values. - $hdr_val = preg_replace( - '#([\x80-\xFF])#e', - '"=" . strtoupper(dechex(ord("\1")))', - $hdr_val - ); - //This regexp will break QP-encoded text at every $maxLength - //but will not break any encoded letters. - $reg1st = "|(.{0,$maxLength1stLine})[^\=]|"; - $reg2nd = "|(.{0,$maxLength})[^\=]|"; - break; - } - //Begin with the regexp for the first line. - $reg = $reg1st; - //Prevent lins that are just way to short; - if ($maxLength1stLine >1){ - $reg = $reg2nd; - } - $output = ""; - while ($hdr_val) { - //Split translated string at every $maxLength - //But make sure not to break any translated chars. - $found = preg_match($reg, $hdr_val, $matches); - - //After this first line, we need to use a different - //regexp for the first line. - $reg = $reg2nd; - - //Save the found part and encapsulate it in the - //prefix & suffix. Then remove the part from the - //$hdr_val variable. - if ($found){ - $part = $matches[0]; - $hdr_val = substr($hdr_val, strlen($matches[0])); - }else{ - $part = $hdr_val; - $hdr_val = ""; - } - - //RFC 2047 specifies that any split header should be seperated - //by a CRLF SPACE. - if ($output){ - $output .= "\r\n "; - } - $output .= $prefix . $part . $suffix; - } - $hdr_val = $output; - } - $hdr_value_out .= $hdr_val; - } - $input[$hdr_name] = $hdr_value_out; - } - - return $input; - } - - /** - * Set the object's end-of-line and define the constant if applicable - * - * @param string $eol End Of Line sequence - * @access private - */ - function _setEOL($eol) - { - $this->_eol = $eol; - if (!defined('MAIL_MIME_CRLF')) { - define('MAIL_MIME_CRLF', $this->_eol, true); - } - } - - - -} // End of class diff --git a/program/lib/Mail/mimeDecode.php b/program/lib/Mail/mimeDecode.php deleted file mode 100644 index 455ec54..0000000 --- a/program/lib/Mail/mimeDecode.php +++ /dev/null @@ -1,849 +0,0 @@ - - * Copyright (c) 2003-2006, PEAR - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - Neither the name of the authors, nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * - * @category Mail - * @package Mail_Mime - * @author Richard Heyes - * @author George Schlossnagle - * @author Cipriano Groenendal - * @author Sean Coates - * @copyright 2003-2006 PEAR - * @license http://www.opensource.org/licenses/bsd-license.php BSD License - * @version CVS: $Id: mimeDecode.php 514 2007-03-21 09:54:10Z thomasb $ - * @link http://pear.php.net/package/Mail_mime - */ - - -/** - * require PEAR - * - * This package depends on PEAR to raise errors. - */ -require_once 'PEAR.php'; - - -/** - * The Mail_mimeDecode class is used to decode mail/mime messages - * - * This class will parse a raw mime email and return the structure. - * Returned structure is similar to that returned by imap_fetchstructure(). - * - * +----------------------------- IMPORTANT ------------------------------+ - * | Usage of this class compared to native php extensions such as | - * | mailparse or imap, is slow and may be feature deficient. If available| - * | you are STRONGLY recommended to use the php extensions. | - * +----------------------------------------------------------------------+ - * - * @category Mail - * @package Mail_Mime - * @author Richard Heyes - * @author George Schlossnagle - * @author Cipriano Groenendal - * @author Sean Coates - * @copyright 2003-2006 PEAR - * @license http://www.opensource.org/licenses/bsd-license.php BSD License - * @version Release: @package_version@ - * @link http://pear.php.net/package/Mail_mime - */ -class Mail_mimeDecode extends PEAR -{ - /** - * The raw email to decode - * - * @var string - * @access private - */ - var $_input; - - /** - * The header part of the input - * - * @var string - * @access private - */ - var $_header; - - /** - * The body part of the input - * - * @var string - * @access private - */ - var $_body; - - /** - * If an error occurs, this is used to store the message - * - * @var string - * @access private - */ - var $_error; - - /** - * Flag to determine whether to include bodies in the - * returned object. - * - * @var boolean - * @access private - */ - var $_include_bodies; - - /** - * Flag to determine whether to decode bodies - * - * @var boolean - * @access private - */ - var $_decode_bodies; - - /** - * Flag to determine whether to decode headers - * - * @var boolean - * @access private - */ - var $_decode_headers; - - /** - * Constructor. - * - * Sets up the object, initialise the variables, and splits and - * stores the header and body of the input. - * - * @param string The input to decode - * @access public - */ - function Mail_mimeDecode($input) - { - list($header, $body) = $this->_splitBodyHeader($input); - - $this->_input = $input; - $this->_header = $header; - $this->_body = $body; - $this->_decode_bodies = false; - $this->_include_bodies = true; - } - - /** - * Begins the decoding process. If called statically - * it will create an object and call the decode() method - * of it. - * - * @param array An array of various parameters that determine - * various things: - * include_bodies - Whether to include the body in the returned - * object. - * decode_bodies - Whether to decode the bodies - * of the parts. (Transfer encoding) - * decode_headers - Whether to decode headers - * input - If called statically, this will be treated - * as the input - * @return object Decoded results - * @access public - */ - function decode($params = null) - { - // determine if this method has been called statically - $isStatic = !(isset($this) && get_class($this) == __CLASS__); - - // Have we been called statically? - // If so, create an object and pass details to that. - if ($isStatic AND isset($params['input'])) { - - $obj = new Mail_mimeDecode($params['input']); - $structure = $obj->decode($params); - - // Called statically but no input - } elseif ($isStatic) { - return PEAR::raiseError('Called statically and no input given'); - - // Called via an object - } else { - $this->_include_bodies = isset($params['include_bodies']) ? - $params['include_bodies'] : false; - $this->_decode_bodies = isset($params['decode_bodies']) ? - $params['decode_bodies'] : false; - $this->_decode_headers = isset($params['decode_headers']) ? - $params['decode_headers'] : false; - - $structure = $this->_decode($this->_header, $this->_body); - if ($structure === false) { - $structure = $this->raiseError($this->_error); - } - } - - return $structure; - } - - /** - * Performs the decoding. Decodes the body string passed to it - * If it finds certain content-types it will call itself in a - * recursive fashion - * - * @param string Header section - * @param string Body section - * @return object Results of decoding process - * @access private - */ - function _decode($headers, $body, $default_ctype = 'text/plain') - { - $return = new stdClass; - $return->headers = array(); - $headers = $this->_parseHeaders($headers); - - foreach ($headers as $value) { - if (isset($return->headers[strtolower($value['name'])]) AND !is_array($return->headers[strtolower($value['name'])])) { - $return->headers[strtolower($value['name'])] = array($return->headers[strtolower($value['name'])]); - $return->headers[strtolower($value['name'])][] = $value['value']; - - } elseif (isset($return->headers[strtolower($value['name'])])) { - $return->headers[strtolower($value['name'])][] = $value['value']; - - } else { - $return->headers[strtolower($value['name'])] = $value['value']; - } - } - - reset($headers); - while (list($key, $value) = each($headers)) { - $headers[$key]['name'] = strtolower($headers[$key]['name']); - switch ($headers[$key]['name']) { - - case 'content-type': - $content_type = $this->_parseHeaderValue($headers[$key]['value']); - - if (preg_match('/([0-9a-z+.-]+)\/([0-9a-z+.-]+)/i', $content_type['value'], $regs)) { - $return->ctype_primary = $regs[1]; - $return->ctype_secondary = $regs[2]; - } - - if (isset($content_type['other'])) { - while (list($p_name, $p_value) = each($content_type['other'])) { - $return->ctype_parameters[$p_name] = $p_value; - } - } - break; - - case 'content-disposition': - $content_disposition = $this->_parseHeaderValue($headers[$key]['value']); - $return->disposition = $content_disposition['value']; - if (isset($content_disposition['other'])) { - while (list($p_name, $p_value) = each($content_disposition['other'])) { - $return->d_parameters[$p_name] = $p_value; - } - } - break; - - case 'content-transfer-encoding': - $content_transfer_encoding = $this->_parseHeaderValue($headers[$key]['value']); - break; - } - } - - if (isset($content_type)) { - switch (strtolower($content_type['value'])) { - case 'text/plain': - $encoding = isset($content_transfer_encoding) ? $content_transfer_encoding['value'] : '7bit'; - $this->_include_bodies ? $return->body = ($this->_decode_bodies ? $this->_decodeBody($body, $encoding) : $body) : null; - break; - - case 'text/html': - $encoding = isset($content_transfer_encoding) ? $content_transfer_encoding['value'] : '7bit'; - $this->_include_bodies ? $return->body = ($this->_decode_bodies ? $this->_decodeBody($body, $encoding) : $body) : null; - break; - - case 'multipart/parallel': - case 'multipart/appledouble': // Appledouble mail - case 'multipart/report': // RFC1892 - case 'multipart/signed': // PGP - case 'multipart/digest': - case 'multipart/alternative': - case 'multipart/related': - case 'multipart/mixed': - if(!isset($content_type['other']['boundary'])){ - $this->_error = 'No boundary found for ' . $content_type['value'] . ' part'; - return false; - } - - $default_ctype = (strtolower($content_type['value']) === 'multipart/digest') ? 'message/rfc822' : 'text/plain'; - - $parts = $this->_boundarySplit($body, $content_type['other']['boundary']); - for ($i = 0; $i < count($parts); $i++) { - list($part_header, $part_body) = $this->_splitBodyHeader($parts[$i]); - $part = $this->_decode($part_header, $part_body, $default_ctype); - if($part === false) - $part = $this->raiseError($this->_error); - $return->parts[] = $part; - } - break; - - case 'message/rfc822': - $obj = &new Mail_mimeDecode($body); - $return->parts[] = $obj->decode(array('include_bodies' => $this->_include_bodies, - 'decode_bodies' => $this->_decode_bodies, - 'decode_headers' => $this->_decode_headers)); - unset($obj); - break; - - default: - if(!isset($content_transfer_encoding['value'])) - $content_transfer_encoding['value'] = '7bit'; - $this->_include_bodies ? $return->body = ($this->_decode_bodies ? $this->_decodeBody($body, $content_transfer_encoding['value']) : $body) : null; - break; - } - - } else { - $ctype = explode('/', $default_ctype); - $return->ctype_primary = $ctype[0]; - $return->ctype_secondary = $ctype[1]; - $this->_include_bodies ? $return->body = ($this->_decode_bodies ? $this->_decodeBody($body) : $body) : null; - } - - return $return; - } - - /** - * Given the output of the above function, this will return an - * array of references to the parts, indexed by mime number. - * - * @param object $structure The structure to go through - * @param string $mime_number Internal use only. - * @return array Mime numbers - */ - function &getMimeNumbers(&$structure, $no_refs = false, $mime_number = '', $prepend = '') - { - $return = array(); - if (!empty($structure->parts)) { - if ($mime_number != '') { - $structure->mime_id = $prepend . $mime_number; - $return[$prepend . $mime_number] = &$structure; - } - for ($i = 0; $i < count($structure->parts); $i++) { - - - if (!empty($structure->headers['content-type']) AND substr(strtolower($structure->headers['content-type']), 0, 8) == 'message/') { - $prepend = $prepend . $mime_number . '.'; - $_mime_number = ''; - } else { - $_mime_number = ($mime_number == '' ? $i + 1 : sprintf('%s.%s', $mime_number, $i + 1)); - } - - $arr = &Mail_mimeDecode::getMimeNumbers($structure->parts[$i], $no_refs, $_mime_number, $prepend); - foreach ($arr as $key => $val) { - $no_refs ? $return[$key] = '' : $return[$key] = &$arr[$key]; - } - } - } else { - if ($mime_number == '') { - $mime_number = '1'; - } - $structure->mime_id = $prepend . $mime_number; - $no_refs ? $return[$prepend . $mime_number] = '' : $return[$prepend . $mime_number] = &$structure; - } - - return $return; - } - - /** - * Given a string containing a header and body - * section, this function will split them (at the first - * blank line) and return them. - * - * @param string Input to split apart - * @return array Contains header and body section - * @access private - */ - function _splitBodyHeader($input) - { - if (preg_match("/^(.*?)\r?\n\r?\n(.*)/s", $input, $match)) { - return array($match[1], $match[2]); - } - $this->_error = 'Could not split header and body'; - return false; - } - - /** - * Parse headers given in $input and return - * as assoc array. - * - * @param string Headers to parse - * @return array Contains parsed headers - * @access private - */ - function _parseHeaders($input) - { - - if ($input !== '') { - // Unfold the input - $input = preg_replace("/\r?\n/", "\r\n", $input); - $input = preg_replace("/\r\n(\t| )+/", ' ', $input); - $headers = explode("\r\n", trim($input)); - - foreach ($headers as $value) { - $hdr_name = substr($value, 0, $pos = strpos($value, ':')); - $hdr_value = substr($value, $pos+1); - if($hdr_value[0] == ' ') - $hdr_value = substr($hdr_value, 1); - - $return[] = array( - 'name' => $hdr_name, - 'value' => $this->_decode_headers ? $this->_decodeHeader($hdr_value) : $hdr_value - ); - } - } else { - $return = array(); - } - - return $return; - } - - /** - * Function to parse a header value, - * extract first part, and any secondary - * parts (after ;) This function is not as - * robust as it could be. Eg. header comments - * in the wrong place will probably break it. - * - * @param string Header value to parse - * @return array Contains parsed result - * @access private - */ - function _parseHeaderValue($input) - { - - if (($pos = strpos($input, ';')) !== false) { - - $return['value'] = trim(substr($input, 0, $pos)); - $input = trim(substr($input, $pos+1)); - - if (strlen($input) > 0) { - - // This splits on a semi-colon, if there's no preceeding backslash - // Now works with quoted values; had to glue the \; breaks in PHP - // the regex is already bordering on incomprehensible - $splitRegex = '/([^;\'"]*[\'"]([^\'"]*([^\'"]*)*)[\'"][^;\'"]*|([^;]+))(;|$)/'; - preg_match_all($splitRegex, $input, $matches); - $parameters = array(); - for ($i=0; $i_quotedPrintableDecode($input); - break; - - case 'base64': - return base64_decode($input); - break; - - default: - return $input; - } - } - - /** - * Given a quoted-printable string, this - * function will decode and return it. - * - * @param string Input body to decode - * @return string Decoded body - * @access private - */ - function _quotedPrintableDecode($input) - { - // Remove soft line breaks - $input = preg_replace("/=\r?\n/", '', $input); - - // Replace encoded characters - $input = preg_replace('/=([a-f0-9]{2})/ie', "chr(hexdec('\\1'))", $input); - - return $input; - } - - /** - * Checks the input for uuencoded files and returns - * an array of them. Can be called statically, eg: - * - * $files =& Mail_mimeDecode::uudecode($some_text); - * - * It will check for the begin 666 ... end syntax - * however and won't just blindly decode whatever you - * pass it. - * - * @param string Input body to look for attahcments in - * @return array Decoded bodies, filenames and permissions - * @access public - * @author Unknown - */ - function &uudecode($input) - { - // Find all uuencoded sections - preg_match_all("/begin ([0-7]{3}) (.+)\r?\n(.+)\r?\nend/Us", $input, $matches); - - for ($j = 0; $j < count($matches[3]); $j++) { - - $str = $matches[3][$j]; - $filename = $matches[2][$j]; - $fileperm = $matches[1][$j]; - - $file = ''; - $str = preg_split("/\r?\n/", trim($str)); - $strlen = count($str); - - for ($i = 0; $i < $strlen; $i++) { - $pos = 1; - $d = 0; - $len=(int)(((ord(substr($str[$i],0,1)) -32) - ' ') & 077); - - while (($d + 3 <= $len) AND ($pos + 4 <= strlen($str[$i]))) { - $c0 = (ord(substr($str[$i],$pos,1)) ^ 0x20); - $c1 = (ord(substr($str[$i],$pos+1,1)) ^ 0x20); - $c2 = (ord(substr($str[$i],$pos+2,1)) ^ 0x20); - $c3 = (ord(substr($str[$i],$pos+3,1)) ^ 0x20); - $file .= chr(((($c0 - ' ') & 077) << 2) | ((($c1 - ' ') & 077) >> 4)); - - $file .= chr(((($c1 - ' ') & 077) << 4) | ((($c2 - ' ') & 077) >> 2)); - - $file .= chr(((($c2 - ' ') & 077) << 6) | (($c3 - ' ') & 077)); - - $pos += 4; - $d += 3; - } - - if (($d + 2 <= $len) && ($pos + 3 <= strlen($str[$i]))) { - $c0 = (ord(substr($str[$i],$pos,1)) ^ 0x20); - $c1 = (ord(substr($str[$i],$pos+1,1)) ^ 0x20); - $c2 = (ord(substr($str[$i],$pos+2,1)) ^ 0x20); - $file .= chr(((($c0 - ' ') & 077) << 2) | ((($c1 - ' ') & 077) >> 4)); - - $file .= chr(((($c1 - ' ') & 077) << 4) | ((($c2 - ' ') & 077) >> 2)); - - $pos += 3; - $d += 2; - } - - if (($d + 1 <= $len) && ($pos + 2 <= strlen($str[$i]))) { - $c0 = (ord(substr($str[$i],$pos,1)) ^ 0x20); - $c1 = (ord(substr($str[$i],$pos+1,1)) ^ 0x20); - $file .= chr(((($c0 - ' ') & 077) << 2) | ((($c1 - ' ') & 077) >> 4)); - - } - } - $files[] = array('filename' => $filename, 'fileperm' => $fileperm, 'filedata' => $file); - } - - return $files; - } - - /** - * getSendArray() returns the arguments required for Mail::send() - * used to build the arguments for a mail::send() call - * - * Usage: - * $mailtext = Full email (for example generated by a template) - * $decoder = new Mail_mimeDecode($mailtext); - * $parts = $decoder->getSendArray(); - * if (!PEAR::isError($parts) { - * list($recipents,$headers,$body) = $parts; - * $mail = Mail::factory('smtp'); - * $mail->send($recipents,$headers,$body); - * } else { - * echo $parts->message; - * } - * @return mixed array of recipeint, headers,body or Pear_Error - * @access public - * @author Alan Knowles - */ - function getSendArray() - { - // prevent warning if this is not set - $this->_decode_headers = FALSE; - $headerlist =$this->_parseHeaders($this->_header); - $to = ""; - if (!$headerlist) { - return $this->raiseError("Message did not contain headers"); - } - foreach($headerlist as $item) { - $header[$item['name']] = $item['value']; - switch (strtolower($item['name'])) { - case "to": - case "cc": - case "bcc": - $to = ",".$item['value']; - default: - break; - } - } - if ($to == "") { - return $this->raiseError("Message did not contain any recipents"); - } - $to = substr($to,1); - return array($to,$header,$this->_body); - } - - /** - * Returns a xml copy of the output of - * Mail_mimeDecode::decode. Pass the output in as the - * argument. This function can be called statically. Eg: - * - * $output = $obj->decode(); - * $xml = Mail_mimeDecode::getXML($output); - * - * The DTD used for this should have been in the package. Or - * alternatively you can get it from cvs, or here: - * http://www.phpguru.org/xmail/xmail.dtd. - * - * @param object Input to convert to xml. This should be the - * output of the Mail_mimeDecode::decode function - * @return string XML version of input - * @access public - */ - function getXML($input) - { - $crlf = "\r\n"; - $output = '' . $crlf . - '' . $crlf . - '' . $crlf . - Mail_mimeDecode::_getXML($input) . - ''; - - return $output; - } - - /** - * Function that does the actual conversion to xml. Does a single - * mimepart at a time. - * - * @param object Input to convert to xml. This is a mimepart object. - * It may or may not contain subparts. - * @param integer Number of tabs to indent - * @return string XML version of input - * @access private - */ - function _getXML($input, $indent = 1) - { - $htab = "\t"; - $crlf = "\r\n"; - $output = ''; - $headers = @(array)$input->headers; - - foreach ($headers as $hdr_name => $hdr_value) { - - // Multiple headers with this name - if (is_array($headers[$hdr_name])) { - for ($i = 0; $i < count($hdr_value); $i++) { - $output .= Mail_mimeDecode::_getXML_helper($hdr_name, $hdr_value[$i], $indent); - } - - // Only one header of this sort - } else { - $output .= Mail_mimeDecode::_getXML_helper($hdr_name, $hdr_value, $indent); - } - } - - if (!empty($input->parts)) { - for ($i = 0; $i < count($input->parts); $i++) { - $output .= $crlf . str_repeat($htab, $indent) . '' . $crlf . - Mail_mimeDecode::_getXML($input->parts[$i], $indent+1) . - str_repeat($htab, $indent) . '' . $crlf; - } - } elseif (isset($input->body)) { - $output .= $crlf . str_repeat($htab, $indent) . 'body . ']]>' . $crlf; - } - - return $output; - } - - /** - * Helper function to _getXML(). Returns xml of a header. - * - * @param string Name of header - * @param string Value of header - * @param integer Number of tabs to indent - * @return string XML version of input - * @access private - */ - function _getXML_helper($hdr_name, $hdr_value, $indent) - { - $htab = "\t"; - $crlf = "\r\n"; - $return = ''; - - $new_hdr_value = ($hdr_name != 'received') ? Mail_mimeDecode::_parseHeaderValue($hdr_value) : array('value' => $hdr_value); - $new_hdr_name = str_replace(' ', '-', ucwords(str_replace('-', ' ', $hdr_name))); - - // Sort out any parameters - if (!empty($new_hdr_value['other'])) { - foreach ($new_hdr_value['other'] as $paramname => $paramvalue) { - $params[] = str_repeat($htab, $indent) . $htab . '' . $crlf . - str_repeat($htab, $indent) . $htab . $htab . '' . htmlspecialchars($paramname) . '' . $crlf . - str_repeat($htab, $indent) . $htab . $htab . '' . htmlspecialchars($paramvalue) . '' . $crlf . - str_repeat($htab, $indent) . $htab . '' . $crlf; - } - - $params = implode('', $params); - } else { - $params = ''; - } - - $return = str_repeat($htab, $indent) . '
' . $crlf . - str_repeat($htab, $indent) . $htab . '' . htmlspecialchars($new_hdr_name) . '' . $crlf . - str_repeat($htab, $indent) . $htab . '' . htmlspecialchars($new_hdr_value['value']) . '' . $crlf . - $params . - str_repeat($htab, $indent) . '
' . $crlf; - - return $return; - } - -} // End of class diff --git a/program/lib/Mail/mimePart.php b/program/lib/Mail/mimePart.php deleted file mode 100644 index f98dee5..0000000 --- a/program/lib/Mail/mimePart.php +++ /dev/null @@ -1,341 +0,0 @@ - - * Copyright (c) 2003-2006, PEAR - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - Neither the name of the authors, nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - * - * @category Mail - * @package Mail_Mime - * @author Richard Heyes - * @author Cipriano Groenendal - * @author Sean Coates - * @copyright 2003-2006 PEAR - * @license http://www.opensource.org/licenses/bsd-license.php BSD License - * @version CVS: $Id: mimePart.php 514 2007-03-21 09:54:10Z thomasb $ - * @link http://pear.php.net/package/Mail_mime - */ - - -/** - * The Mail_mimePart class is used to create MIME E-mail messages - * - * This class enables you to manipulate and build a mime email - * from the ground up. The Mail_Mime class is a userfriendly api - * to this class for people who aren't interested in the internals - * of mime mail. - * This class however allows full control over the email. - * - * @category Mail - * @package Mail_Mime - * @author Richard Heyes - * @author Cipriano Groenendal - * @author Sean Coates - * @copyright 2003-2006 PEAR - * @license http://www.opensource.org/licenses/bsd-license.php BSD License - * @version Release: @package_version@ - * @link http://pear.php.net/package/Mail_mime - */ -class Mail_mimePart { - - /** - * The encoding type of this part - * - * @var string - * @access private - */ - var $_encoding; - - /** - * An array of subparts - * - * @var array - * @access private - */ - var $_subparts; - - /** - * The output of this part after being built - * - * @var string - * @access private - */ - var $_encoded; - - /** - * Headers for this part - * - * @var array - * @access private - */ - var $_headers; - - /** - * The body of this part (not encoded) - * - * @var string - * @access private - */ - var $_body; - - /** - * Constructor. - * - * Sets up the object. - * - * @param $body - The body of the mime part if any. - * @param $params - An associative array of parameters: - * content_type - The content type for this part eg multipart/mixed - * encoding - The encoding to use, 7bit, 8bit, base64, or quoted-printable - * cid - Content ID to apply - * disposition - Content disposition, inline or attachment - * dfilename - Optional filename parameter for content disposition - * description - Content description - * charset - Character set to use - * @access public - */ - function Mail_mimePart($body = '', $params = array()) - { - if (!defined('MAIL_MIMEPART_CRLF')) { - define('MAIL_MIMEPART_CRLF', defined('MAIL_MIME_CRLF') ? MAIL_MIME_CRLF : "\r\n", TRUE); - } - - foreach ($params as $key => $value) { - switch ($key) { - case 'content_type': - $headers['Content-Type'] = $value . (isset($charset) ? '; charset="' . $charset . '"' : ''); - break; - - case 'encoding': - $this->_encoding = $value; - $headers['Content-Transfer-Encoding'] = $value; - break; - - case 'cid': - $headers['Content-ID'] = '<' . $value . '>'; - break; - - case 'disposition': - $headers['Content-Disposition'] = $value . (isset($dfilename) ? '; filename="' . $dfilename . '"' : ''); - break; - - case 'dfilename': - if (isset($headers['Content-Disposition'])) { - $headers['Content-Disposition'] .= '; filename="' . $value . '"'; - } else { - $dfilename = $value; - } - break; - - case 'description': - $headers['Content-Description'] = $value; - break; - - case 'charset': - if (isset($headers['Content-Type'])) { - $headers['Content-Type'] .= '; charset="' . $value . '"'; - } else { - $charset = $value; - } - break; - } - } - - // Default content-type - if (!isset($headers['Content-Type'])) { - $headers['Content-Type'] = 'text/plain'; - } - - //Default encoding - if (!isset($this->_encoding)) { - $this->_encoding = '7bit'; - } - - // Assign stuff to member variables - $this->_encoded = array(); - $this->_headers = $headers; - $this->_body = $body; - } - - /** - * encode() - * - * Encodes and returns the email. Also stores - * it in the encoded member variable - * - * @return An associative array containing two elements, - * body and headers. The headers element is itself - * an indexed array. - * @access public - */ - function encode() - { - $encoded =& $this->_encoded; - - if (!empty($this->_subparts)) { - srand((double)microtime()*1000000); - $boundary = '=_' . md5(rand() . microtime()); - $this->_headers['Content-Type'] .= ';' . MAIL_MIMEPART_CRLF . "\t" . 'boundary="' . $boundary . '"'; - - // Add body parts to $subparts - for ($i = 0; $i < count($this->_subparts); $i++) { - $headers = array(); - $tmp = $this->_subparts[$i]->encode(); - foreach ($tmp['headers'] as $key => $value) { - $headers[] = $key . ': ' . $value; - } - $subparts[] = implode(MAIL_MIMEPART_CRLF, $headers) . MAIL_MIMEPART_CRLF . MAIL_MIMEPART_CRLF . $tmp['body']; - } - - $encoded['body'] = '--' . $boundary . MAIL_MIMEPART_CRLF . - implode('--' . $boundary . MAIL_MIMEPART_CRLF, $subparts) . - '--' . $boundary.'--' . MAIL_MIMEPART_CRLF . MAIL_MIMEPART_CRLF; - - } else { - $encoded['body'] = $this->_getEncodedData($this->_body, $this->_encoding) . MAIL_MIMEPART_CRLF; - } - - // Add headers to $encoded - $encoded['headers'] =& $this->_headers; - - return $encoded; - } - - /** - * &addSubPart() - * - * Adds a subpart to current mime part and returns - * a reference to it - * - * @param $body The body of the subpart, if any. - * @param $params The parameters for the subpart, same - * as the $params argument for constructor. - * @return A reference to the part you just added. It is - * crucial if using multipart/* in your subparts that - * you use =& in your script when calling this function, - * otherwise you will not be able to add further subparts. - * @access public - */ - function &addSubPart($body, $params) - { - $this->_subparts[] = new Mail_mimePart($body, $params); - return $this->_subparts[count($this->_subparts) - 1]; - } - - /** - * _getEncodedData() - * - * Returns encoded data based upon encoding passed to it - * - * @param $data The data to encode. - * @param $encoding The encoding type to use, 7bit, base64, - * or quoted-printable. - * @access private - */ - function _getEncodedData($data, $encoding) - { - switch ($encoding) { - case '8bit': - case '7bit': - return $data; - break; - - case 'quoted-printable': - return $this->_quotedPrintableEncode($data); - break; - - case 'base64': - return rtrim(chunk_split(base64_encode($data), 76, MAIL_MIMEPART_CRLF)); - break; - - default: - return $data; - } - } - - /** - * quotedPrintableEncode() - * - * Encodes data to quoted-printable standard. - * - * @param $input The data to encode - * @param $line_max Optional max line length. Should - * not be more than 76 chars - * - * @access private - */ - function _quotedPrintableEncode($input , $line_max = 76) - { - $lines = preg_split("/\r?\n/", $input); - $eol = MAIL_MIMEPART_CRLF; - $escape = '='; - $output = ''; - - while(list(, $line) = each($lines)){ - - $line = preg_split('||', $line, -1, PREG_SPLIT_NO_EMPTY); - $linlen = count($line); - $newline = ''; - - for ($i = 0; $i < $linlen; $i++) { - $char = $line[$i]; - $dec = ord($char); - - if (($dec == 32) AND ($i == ($linlen - 1))){ // convert space at eol only - $char = '=20'; - - } elseif(($dec == 9) AND ($i == ($linlen - 1))) { // convert tab at eol only - $char = '=09'; - } elseif($dec == 9) { - ; // Do nothing if a tab. - } elseif(($dec == 61) OR ($dec < 32 ) OR ($dec > 126)) { - $char = $escape . strtoupper(sprintf('%02s', dechex($dec))); - } - - if ((strlen($newline) + strlen($char)) >= $line_max) { // MAIL_MIMEPART_CRLF is not counted - $output .= $newline . $escape . $eol; // soft line break; " =\r\n" is okay - $newline = ''; - } - $newline .= $char; - } // end of for - $output .= $newline . $eol; - } - $output = substr($output, 0, -1 * strlen($eol)); // Don't want last crlf - return $output; - } -} // End of class diff --git a/program/lib/Net/SMTP.php b/program/lib/Net/SMTP.php deleted file mode 100644 index 8612cf6..0000000 --- a/program/lib/Net/SMTP.php +++ /dev/null @@ -1,992 +0,0 @@ - | -// | Jon Parise | -// | Damian Alejandro Fernandez Sosa | -// +----------------------------------------------------------------------+ -// -// $Id: SMTP.php 399 2006-12-06 21:37:37Z thomasb $ - -require_once 'PEAR.php'; -require_once 'Net/Socket.php'; - -/** - * Provides an implementation of the SMTP protocol using PEAR's - * Net_Socket:: class. - * - * @package Net_SMTP - * @author Chuck Hagenbuch - * @author Jon Parise - * @author Damian Alejandro Fernandez Sosa - * - * @example basic.php A basic implementation of the Net_SMTP package. - */ -class Net_SMTP -{ - - /** - * The server to connect to. - * @var string - * @access public - */ - var $host = 'localhost'; - - /** - * The port to connect to. - * @var int - * @access public - */ - var $port = 25; - - /** - * The value to give when sending EHLO or HELO. - * @var string - * @access public - */ - var $localhost = 'localhost'; - - /** - * List of supported authentication methods, in preferential order. - * @var array - * @access public - */ - var $auth_methods = array('DIGEST-MD5', 'CRAM-MD5', 'LOGIN', 'PLAIN'); - - /** - * Should debugging output be enabled? - * @var boolean - * @access private - */ - var $_debug = false; - - /** - * The socket resource being used to connect to the SMTP server. - * @var resource - * @access private - */ - var $_socket = null; - - /** - * The most recent server response code. - * @var int - * @access private - */ - var $_code = -1; - - /** - * The most recent server response arguments. - * @var array - * @access private - */ - var $_arguments = array(); - - /** - * Stores detected features of the SMTP server. - * @var array - * @access private - */ - var $_esmtp = array(); - - /** - * Instantiates a new Net_SMTP object, overriding any defaults - * with parameters that are passed in. - * - * If you have SSL support in PHP, you can connect to a server - * over SSL using an 'ssl://' prefix: - * - * // 465 is a common smtps port. - * $smtp = new Net_SMTP('ssl://mail.host.com', 465); - * $smtp->connect(); - * - * @param string $host The server to connect to. - * @param integer $port The port to connect to. - * @param string $localhost The value to give when sending EHLO or HELO. - * - * @access public - * @since 1.0 - */ - function Net_SMTP($host = null, $port = null, $localhost = null) - { - if (isset($host)) $this->host = $host; - if (isset($port)) $this->port = $port; - if (isset($localhost)) $this->localhost = $localhost; - - $this->_socket = &new Net_Socket(); - - /* - * Include the Auth_SASL package. If the package is not available, - * we disable the authentication methods that depend upon it. - */ - if ((@include_once 'Auth/SASL.php') === false) { - $pos = array_search('DIGEST-MD5', $this->auth_methods); - unset($this->auth_methods[$pos]); - $pos = array_search('CRAM-MD5', $this->auth_methods); - unset($this->auth_methods[$pos]); - } - } - - /** - * Set the value of the debugging flag. - * - * @param boolean $debug New value for the debugging flag. - * - * @access public - * @since 1.1.0 - */ - function setDebug($debug) - { - $this->_debug = $debug; - } - - /** - * Send the given string of data to the server. - * - * @param string $data The string of data to send. - * - * @return mixed True on success or a PEAR_Error object on failure. - * - * @access private - * @since 1.1.0 - */ - function _send($data) - { - if ($this->_debug) { - echo "DEBUG: Send: $data\n"; - } - - if (PEAR::isError($error = $this->_socket->write($data))) { - return PEAR::raiseError('Failed to write to socket: ' . - $error->getMessage()); - } - - return true; - } - - /** - * Send a command to the server with an optional string of - * arguments. A carriage return / linefeed (CRLF) sequence will - * be appended to each command string before it is sent to the - * SMTP server - an error will be thrown if the command string - * already contains any newline characters. Use _send() for - * commands that must contain newlines. - * - * @param string $command The SMTP command to send to the server. - * @param string $args A string of optional arguments to append - * to the command. - * - * @return mixed The result of the _send() call. - * - * @access private - * @since 1.1.0 - */ - function _put($command, $args = '') - { - if (!empty($args)) { - $command .= ' ' . $args; - } - - if (strcspn($command, "\r\n") !== strlen($command)) { - return PEAR::raiseError('Commands cannot contain newlines'); - } - - return $this->_send($command . "\r\n"); - } - - /** - * Read a reply from the SMTP server. The reply consists of a response - * code and a response message. - * - * @param mixed $valid The set of valid response codes. These - * may be specified as an array of integer - * values or as a single integer value. - * - * @return mixed True if the server returned a valid response code or - * a PEAR_Error object is an error condition is reached. - * - * @access private - * @since 1.1.0 - * - * @see getResponse - */ - function _parseResponse($valid) - { - $this->_code = -1; - $this->_arguments = array(); - - while ($line = $this->_socket->readLine()) { - if ($this->_debug) { - echo "DEBUG: Recv: $line\n"; - } - - /* If we receive an empty line, the connection has been closed. */ - if (empty($line)) { - $this->disconnect(); - return PEAR::raiseError('Connection was unexpectedly closed'); - } - - /* Read the code and store the rest in the arguments array. */ - $code = substr($line, 0, 3); - $this->_arguments[] = trim(substr($line, 4)); - - /* Check the syntax of the response code. */ - if (is_numeric($code)) { - $this->_code = (int)$code; - } else { - $this->_code = -1; - break; - } - - /* If this is not a multiline response, we're done. */ - if (substr($line, 3, 1) != '-') { - break; - } - } - - /* Compare the server's response code with the valid code. */ - if (is_int($valid) && ($this->_code === $valid)) { - return true; - } - - /* If we were given an array of valid response codes, check each one. */ - if (is_array($valid)) { - foreach ($valid as $valid_code) { - if ($this->_code === $valid_code) { - return true; - } - } - } - - return PEAR::raiseError('Invalid response code received from server'); - } - - /** - * Return a 2-tuple containing the last response from the SMTP server. - * - * @return array A two-element array: the first element contains the - * response code as an integer and the second element - * contains the response's arguments as a string. - * - * @access public - * @since 1.1.0 - */ - function getResponse() - { - return array($this->_code, join("\n", $this->_arguments)); - } - - /** - * Attempt to connect to the SMTP server. - * - * @param int $timeout The timeout value (in seconds) for the - * socket connection. - * @param bool $persistent Should a persistent socket connection - * be used? - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * @access public - * @since 1.0 - */ - function connect($timeout = null, $persistent = false) - { - $result = $this->_socket->connect($this->host, $this->port, - $persistent, $timeout); - if (PEAR::isError($result)) { - return PEAR::raiseError('Failed to connect socket: ' . - $result->getMessage()); - } - - if (PEAR::isError($error = $this->_parseResponse(220))) { - return $error; - } - if (PEAR::isError($error = $this->_negotiate())) { - return $error; - } - - return true; - } - - /** - * Attempt to disconnect from the SMTP server. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * @access public - * @since 1.0 - */ - function disconnect() - { - if (PEAR::isError($error = $this->_put('QUIT'))) { - return $error; - } - if (PEAR::isError($error = $this->_parseResponse(221))) { - return $error; - } - if (PEAR::isError($error = $this->_socket->disconnect())) { - return PEAR::raiseError('Failed to disconnect socket: ' . - $error->getMessage()); - } - - return true; - } - - /** - * Attempt to send the EHLO command and obtain a list of ESMTP - * extensions available, and failing that just send HELO. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * - * @access private - * @since 1.1.0 - */ - function _negotiate() - { - if (PEAR::isError($error = $this->_put('EHLO', $this->localhost))) { - return $error; - } - - if (PEAR::isError($this->_parseResponse(250))) { - /* If we receive a 503 response, we're already authenticated. */ - if ($this->_code === 503) { - return true; - } - - /* If the EHLO failed, try the simpler HELO command. */ - if (PEAR::isError($error = $this->_put('HELO', $this->localhost))) { - return $error; - } - if (PEAR::isError($this->_parseResponse(250))) { - return PEAR::raiseError('HELO was not accepted: ', $this->_code); - } - - return true; - } - - foreach ($this->_arguments as $argument) { - $verb = strtok($argument, ' '); - $arguments = substr($argument, strlen($verb) + 1, - strlen($argument) - strlen($verb) - 1); - $this->_esmtp[$verb] = $arguments; - } - - return true; - } - - /** - * Returns the name of the best authentication method that the server - * has advertised. - * - * @return mixed Returns a string containing the name of the best - * supported authentication method or a PEAR_Error object - * if a failure condition is encountered. - * @access private - * @since 1.1.0 - */ - function _getBestAuthMethod() - { - $available_methods = explode(' ', $this->_esmtp['AUTH']); - - foreach ($this->auth_methods as $method) { - if (in_array($method, $available_methods)) { - return $method; - } - } - - return PEAR::raiseError('No supported authentication methods'); - } - - /** - * Attempt to do SMTP authentication. - * - * @param string The userid to authenticate as. - * @param string The password to authenticate with. - * @param string The requested authentication method. If none is - * specified, the best supported method will be used. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * @access public - * @since 1.0 - */ - function auth($uid, $pwd , $method = '') - { - if (empty($this->_esmtp['AUTH'])) { - return PEAR::raiseError('SMTP server does no support authentication'); - } - - /* If no method has been specified, get the name of the best - * supported method advertised by the SMTP server. */ - if (empty($method)) { - if (PEAR::isError($method = $this->_getBestAuthMethod())) { - /* Return the PEAR_Error object from _getBestAuthMethod(). */ - return $method; - } - } else { - $method = strtoupper($method); - if (!in_array($method, $this->auth_methods)) { - return PEAR::raiseError("$method is not a supported authentication method"); - } - } - - switch ($method) { - case 'DIGEST-MD5': - $result = $this->_authDigest_MD5($uid, $pwd); - break; - case 'CRAM-MD5': - $result = $this->_authCRAM_MD5($uid, $pwd); - break; - case 'LOGIN': - $result = $this->_authLogin($uid, $pwd); - break; - case 'PLAIN': - $result = $this->_authPlain($uid, $pwd); - break; - default: - $result = PEAR::raiseError("$method is not a supported authentication method"); - break; - } - - /* If an error was encountered, return the PEAR_Error object. */ - if (PEAR::isError($result)) { - return $result; - } - - return true; - } - - /** - * Authenticates the user using the DIGEST-MD5 method. - * - * @param string The userid to authenticate as. - * @param string The password to authenticate with. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * @access private - * @since 1.1.0 - */ - function _authDigest_MD5($uid, $pwd) - { - if (PEAR::isError($error = $this->_put('AUTH', 'DIGEST-MD5'))) { - return $error; - } - /* 334: Continue authentication request */ - if (PEAR::isError($error = $this->_parseResponse(334))) { - /* 503: Error: already authenticated */ - if ($this->_code === 503) { - return true; - } - return $error; - } - - $challenge = base64_decode($this->_arguments[0]); - $digest = &Auth_SASL::factory('digestmd5'); - $auth_str = base64_encode($digest->getResponse($uid, $pwd, $challenge, - $this->host, "smtp")); - - if (PEAR::isError($error = $this->_put($auth_str))) { - return $error; - } - /* 334: Continue authentication request */ - if (PEAR::isError($error = $this->_parseResponse(334))) { - return $error; - } - - /* We don't use the protocol's third step because SMTP doesn't - * allow subsequent authentication, so we just silently ignore - * it. */ - if (PEAR::isError($error = $this->_put(' '))) { - return $error; - } - /* 235: Authentication successful */ - if (PEAR::isError($error = $this->_parseResponse(235))) { - return $error; - } - } - - /** - * Authenticates the user using the CRAM-MD5 method. - * - * @param string The userid to authenticate as. - * @param string The password to authenticate with. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * @access private - * @since 1.1.0 - */ - function _authCRAM_MD5($uid, $pwd) - { - if (PEAR::isError($error = $this->_put('AUTH', 'CRAM-MD5'))) { - return $error; - } - /* 334: Continue authentication request */ - if (PEAR::isError($error = $this->_parseResponse(334))) { - /* 503: Error: already authenticated */ - if ($this->_code === 503) { - return true; - } - return $error; - } - - $challenge = base64_decode($this->_arguments[0]); - $cram = &Auth_SASL::factory('crammd5'); - $auth_str = base64_encode($cram->getResponse($uid, $pwd, $challenge)); - - if (PEAR::isError($error = $this->_put($auth_str))) { - return $error; - } - - /* 235: Authentication successful */ - if (PEAR::isError($error = $this->_parseResponse(235))) { - return $error; - } - } - - /** - * Authenticates the user using the LOGIN method. - * - * @param string The userid to authenticate as. - * @param string The password to authenticate with. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * @access private - * @since 1.1.0 - */ - function _authLogin($uid, $pwd) - { - if (PEAR::isError($error = $this->_put('AUTH', 'LOGIN'))) { - return $error; - } - /* 334: Continue authentication request */ - if (PEAR::isError($error = $this->_parseResponse(334))) { - /* 503: Error: already authenticated */ - if ($this->_code === 503) { - return true; - } - return $error; - } - - if (PEAR::isError($error = $this->_put(base64_encode($uid)))) { - return $error; - } - /* 334: Continue authentication request */ - if (PEAR::isError($error = $this->_parseResponse(334))) { - return $error; - } - - if (PEAR::isError($error = $this->_put(base64_encode($pwd)))) { - return $error; - } - - /* 235: Authentication successful */ - if (PEAR::isError($error = $this->_parseResponse(235))) { - return $error; - } - - return true; - } - - /** - * Authenticates the user using the PLAIN method. - * - * @param string The userid to authenticate as. - * @param string The password to authenticate with. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * @access private - * @since 1.1.0 - */ - function _authPlain($uid, $pwd) - { - if (PEAR::isError($error = $this->_put('AUTH', 'PLAIN'))) { - return $error; - } - /* 334: Continue authentication request */ - if (PEAR::isError($error = $this->_parseResponse(334))) { - /* 503: Error: already authenticated */ - if ($this->_code === 503) { - return true; - } - return $error; - } - - $auth_str = base64_encode(chr(0) . $uid . chr(0) . $pwd); - - if (PEAR::isError($error = $this->_put($auth_str))) { - return $error; - } - - /* 235: Authentication successful */ - if (PEAR::isError($error = $this->_parseResponse(235))) { - return $error; - } - - return true; - } - - /** - * Send the HELO command. - * - * @param string The domain name to say we are. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * @access public - * @since 1.0 - */ - function helo($domain) - { - if (PEAR::isError($error = $this->_put('HELO', $domain))) { - return $error; - } - if (PEAR::isError($error = $this->_parseResponse(250))) { - return $error; - } - - return true; - } - - /** - * Send the MAIL FROM: command. - * - * @param string The sender (reverse path) to set. - * - * @param array optional arguments. Currently supported: - * verp boolean or string. If true or string - * verp is enabled. If string the characters - * are considered verp separators. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * @access public - * @since 1.0 - */ - function mailFrom($sender, $args = array()) - { - $argstr = ''; - - if (isset($args['verp'])) { - /* XVERP */ - if ($args['verp'] === true) { - $argstr .= ' XVERP'; - - /* XVERP=something */ - } elseif (trim($args['verp'])) { - $argstr .= ' XVERP=' . $args['verp']; - } - } - - if (PEAR::isError($error = $this->_put('MAIL', "FROM:<$sender>$argstr"))) { - return $error; - } - if (PEAR::isError($error = $this->_parseResponse(250))) { - return $error; - } - - return true; - } - - /** - * Send the RCPT TO: command. - * - * @param string The recipient (forward path) to add. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * @access public - * @since 1.0 - */ - function rcptTo($recipient) - { - if (PEAR::isError($error = $this->_put('RCPT', "TO:<$recipient>"))) { - return $error; - } - if (PEAR::isError($error = $this->_parseResponse(array(250, 251)))) { - return $error; - } - - return true; - } - - /** - * Quote the data so that it meets SMTP standards. - * - * This is provided as a separate public function to facilitate - * easier overloading for the cases where it is desirable to - * customize the quoting behavior. - * - * @param string $data The message text to quote. The string must be passed - * by reference, and the text will be modified in place. - * - * @access public - * @since 1.2 - */ - function quotedata(&$data) - { - /* Change Unix (\n) and Mac (\r) linefeeds into - * Internet-standard CRLF (\r\n) linefeeds. */ - $data = preg_replace(array('/(?_esmtp['SIZE']) && ($this->_esmtp['SIZE'] > 0)) { - if (strlen($data) >= $this->_esmtp['SIZE']) { - $this->disconnect(); - return PEAR::raiseError('Message size excedes the server limit'); - } - } - - /* Quote the data based on the SMTP standards. */ - $this->quotedata($data); - - if (PEAR::isError($error = $this->_put('DATA'))) { - return $error; - } - if (PEAR::isError($error = $this->_parseResponse(354))) { - return $error; - } - - $data .= "\r\n.\r\n"; - if (PEAR::isError($result = $this->_send($data))) { - return $result; - } - if (PEAR::isError($error = $this->_parseResponse(250))) { - return $error; - } - - return true; - } - - /** - * Send the SEND FROM: command. - * - * @param string The reverse path to send. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * @access public - * @since 1.2.6 - */ - function sendFrom($path) - { - if (PEAR::isError($error = $this->_put('SEND', "FROM:<$path>"))) { - return $error; - } - if (PEAR::isError($error = $this->_parseResponse(250))) { - return $error; - } - - return true; - } - - /** - * Backwards-compatibility wrapper for sendFrom(). - * - * @param string The reverse path to send. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * - * @access public - * @since 1.0 - * @deprecated 1.2.6 - */ - function send_from($path) - { - return sendFrom($path); - } - - /** - * Send the SOML FROM: command. - * - * @param string The reverse path to send. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * @access public - * @since 1.2.6 - */ - function somlFrom($path) - { - if (PEAR::isError($error = $this->_put('SOML', "FROM:<$path>"))) { - return $error; - } - if (PEAR::isError($error = $this->_parseResponse(250))) { - return $error; - } - - return true; - } - - /** - * Backwards-compatibility wrapper for somlFrom(). - * - * @param string The reverse path to send. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * - * @access public - * @since 1.0 - * @deprecated 1.2.6 - */ - function soml_from($path) - { - return somlFrom($path); - } - - /** - * Send the SAML FROM: command. - * - * @param string The reverse path to send. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * @access public - * @since 1.2.6 - */ - function samlFrom($path) - { - if (PEAR::isError($error = $this->_put('SAML', "FROM:<$path>"))) { - return $error; - } - if (PEAR::isError($error = $this->_parseResponse(250))) { - return $error; - } - - return true; - } - - /** - * Backwards-compatibility wrapper for samlFrom(). - * - * @param string The reverse path to send. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * - * @access public - * @since 1.0 - * @deprecated 1.2.6 - */ - function saml_from($path) - { - return samlFrom($path); - } - - /** - * Send the RSET command. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * @access public - * @since 1.0 - */ - function rset() - { - if (PEAR::isError($error = $this->_put('RSET'))) { - return $error; - } - if (PEAR::isError($error = $this->_parseResponse(250))) { - return $error; - } - - return true; - } - - /** - * Send the VRFY command. - * - * @param string The string to verify - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * @access public - * @since 1.0 - */ - function vrfy($string) - { - /* Note: 251 is also a valid response code */ - if (PEAR::isError($error = $this->_put('VRFY', $string))) { - return $error; - } - if (PEAR::isError($error = $this->_parseResponse(array(250, 252)))) { - return $error; - } - - return true; - } - - /** - * Send the NOOP command. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * @access public - * @since 1.0 - */ - function noop() - { - if (PEAR::isError($error = $this->_put('NOOP'))) { - return $error; - } - if (PEAR::isError($error = $this->_parseResponse(250))) { - return $error; - } - - return true; - } - - /** - * Backwards-compatibility method. identifySender()'s functionality is - * now handled internally. - * - * @return boolean This method always return true. - * - * @access public - * @since 1.0 - */ - function identifySender() - { - return true; - } - -} diff --git a/program/lib/Net/Socket.php b/program/lib/Net/Socket.php deleted file mode 100644 index c47eea8..0000000 --- a/program/lib/Net/Socket.php +++ /dev/null @@ -1,456 +0,0 @@ - | -// | Chuck Hagenbuch | -// +----------------------------------------------------------------------+ -// -// $Id: Socket.php 17 2005-10-03 20:25:31Z roundcube $ -// - -require_once 'PEAR.php'; - -/** - * Generalized Socket class. More docs to be written. - * - * @version 1.0 - * @author Stig Bakken - * @author Chuck Hagenbuch - */ -class Net_Socket extends PEAR { - // {{{ properties - - /** Socket file pointer. */ - var $fp = null; - - /** Whether the socket is blocking. */ - var $blocking = true; - - /** Whether the socket is persistent. */ - var $persistent = false; - - /** The IP address to connect to. */ - var $addr = ''; - - /** The port number to connect to. */ - var $port = 0; - - /** Number of seconds to wait on socket connections before - assuming there's no more data. */ - var $timeout = false; - - /** Number of bytes to read at a time in readLine() and - readAll(). */ - var $lineLength = 2048; - // }}} - - // {{{ constructor - /** - * Constructs a new Net_Socket object. - * - * @access public - */ - function Net_Socket() - { - $this->PEAR(); - } - // }}} - - // {{{ connect() - /** - * Connect to the specified port. If called when the socket is - * already connected, it disconnects and connects again. - * - * @param $addr string IP address or host name - * @param $port int TCP port number - * @param $persistent bool (optional) whether the connection is - * persistent (kept open between requests by the web server) - * @param $timeout int (optional) how long to wait for data - * @param $options array see options for stream_context_create - * @access public - * @return mixed true on success or error object - */ - function connect($addr, $port, $persistent = null, $timeout = null, $options = null) - { - if (is_resource($this->fp)) { - @fclose($this->fp); - $this->fp = null; - } - - if (strspn($addr, '.0123456789') == strlen($addr)) { - $this->addr = $addr; - } else { - $this->addr = gethostbyname($addr); - } - $this->port = $port % 65536; - if ($persistent !== null) { - $this->persistent = $persistent; - } - if ($timeout !== null) { - $this->timeout = $timeout; - } - $openfunc = $this->persistent ? 'pfsockopen' : 'fsockopen'; - $errno = 0; - $errstr = ''; - if ($options && function_exists('stream_context_create')) { - if ($this->timeout) { - $timeout = $this->timeout; - } else { - $timeout = 0; - } - $context = stream_context_create($options); - $fp = $openfunc($this->addr, $this->port, $errno, $errstr, $timeout, $context); - } else { - if ($this->timeout) { - $fp = @$openfunc($this->addr, $this->port, $errno, $errstr, $this->timeout); - } else { - $fp = @$openfunc($this->addr, $this->port, $errno, $errstr); - } - } - - if (!$fp) { - return $this->raiseError($errstr, $errno); - } - - $this->fp = $fp; - - return $this->setBlocking($this->blocking); - } - // }}} - - // {{{ disconnect() - /** - * Disconnects from the peer, closes the socket. - * - * @access public - * @return mixed true on success or an error object otherwise - */ - function disconnect() - { - if (is_resource($this->fp)) { - fclose($this->fp); - $this->fp = null; - return true; - } - return $this->raiseError("not connected"); - } - // }}} - - // {{{ isBlocking() - /** - * Find out if the socket is in blocking mode. - * - * @access public - * @return bool the current blocking mode. - */ - function isBlocking() - { - return $this->blocking; - } - // }}} - - // {{{ setBlocking() - /** - * Sets whether the socket connection should be blocking or - * not. A read call to a non-blocking socket will return immediately - * if there is no data available, whereas it will block until there - * is data for blocking sockets. - * - * @param $mode bool true for blocking sockets, false for nonblocking - * @access public - * @return mixed true on success or an error object otherwise - */ - function setBlocking($mode) - { - if (is_resource($this->fp)) { - $this->blocking = $mode; - socket_set_blocking($this->fp, $this->blocking); - return true; - } - return $this->raiseError("not connected"); - } - // }}} - - // {{{ setTimeout() - /** - * Sets the timeout value on socket descriptor, - * expressed in the sum of seconds and microseconds - * - * @param $seconds int seconds - * @param $microseconds int microseconds - * @access public - * @return mixed true on success or an error object otherwise - */ - function setTimeout($seconds, $microseconds) - { - if (is_resource($this->fp)) { - socket_set_timeout($this->fp, $seconds, $microseconds); - return true; - } - return $this->raiseError("not connected"); - } - // }}} - - // {{{ getStatus() - /** - * Returns information about an existing socket resource. - * Currently returns four entries in the result array: - * - *

- * timed_out (bool) - The socket timed out waiting for data
- * blocked (bool) - The socket was blocked
- * eof (bool) - Indicates EOF event
- * unread_bytes (int) - Number of bytes left in the socket buffer
- *

- * - * @access public - * @return mixed Array containing information about existing socket resource or an error object otherwise - */ - function getStatus() - { - if (is_resource($this->fp)) { - return socket_get_status($this->fp); - } - return $this->raiseError("not connected"); - } - // }}} - - // {{{ gets() - /** - * Get a specified line of data - * - * @access public - * @return $size bytes of data from the socket, or a PEAR_Error if - * not connected. - */ - function gets($size) - { - if (is_resource($this->fp)) { - return fgets($this->fp, $size); - } - return $this->raiseError("not connected"); - } - // }}} - - // {{{ read() - /** - * Read a specified amount of data. This is guaranteed to return, - * and has the added benefit of getting everything in one fread() - * chunk; if you know the size of the data you're getting - * beforehand, this is definitely the way to go. - * - * @param $size The number of bytes to read from the socket. - * @access public - * @return $size bytes of data from the socket, or a PEAR_Error if - * not connected. - */ - function read($size) - { - if (is_resource($this->fp)) { - return fread($this->fp, $size); - } - return $this->raiseError("not connected"); - } - // }}} - - // {{{ write() - /** - * Write a specified amount of data. - * - * @access public - * @return mixed true on success or an error object otherwise - */ - function write($data) - { - if (is_resource($this->fp)) { - return fwrite($this->fp, $data); - } - return $this->raiseError("not connected"); - } - // }}} - - // {{{ writeLine() - /** - * Write a line of data to the socket, followed by a trailing "\r\n". - * - * @access public - * @return mixed fputs result, or an error - */ - function writeLine ($data) - { - if (is_resource($this->fp)) { - return $this->write($data . "\r\n"); - } - return $this->raiseError("not connected"); - } - // }}} - - // {{{ eof() - /** - * Tests for end-of-file on a socket descriptor - * - * @access public - * @return bool - */ - function eof() - { - return (is_resource($this->fp) && feof($this->fp)); - } - // }}} - - // {{{ readByte() - /** - * Reads a byte of data - * - * @access public - * @return 1 byte of data from the socket, or a PEAR_Error if - * not connected. - */ - function readByte() - { - if (is_resource($this->fp)) { - return ord($this->read(1)); - } - return $this->raiseError("not connected"); - } - // }}} - - // {{{ readWord() - /** - * Reads a word of data - * - * @access public - * @return 1 word of data from the socket, or a PEAR_Error if - * not connected. - */ - function readWord() - { - if (is_resource($this->fp)) { - $buf = $this->read(2); - return (ord($buf[0]) + (ord($buf[1]) << 8)); - } - return $this->raiseError("not connected"); - } - // }}} - - // {{{ readInt() - /** - * Reads an int of data - * - * @access public - * @return 1 int of data from the socket, or a PEAR_Error if - * not connected. - */ - function readInt() - { - if (is_resource($this->fp)) { - $buf = $this->read(4); - return (ord($buf[0]) + (ord($buf[1]) << 8) + - (ord($buf[2]) << 16) + (ord($buf[3]) << 24)); - } - return $this->raiseError("not connected"); - } - // }}} - - // {{{ readString() - /** - * Reads a zeroterminated string of data - * - * @access public - * @return string, or a PEAR_Error if - * not connected. - */ - function readString() - { - if (is_resource($this->fp)) { - $string = ''; - while (($char = $this->read(1)) != "\x00") { - $string .= $char; - } - return $string; - } - return $this->raiseError("not connected"); - } - // }}} - - // {{{ readIPAddress() - /** - * Reads an IP Address and returns it in a dot formated string - * - * @access public - * @return Dot formated string, or a PEAR_Error if - * not connected. - */ - function readIPAddress() - { - if (is_resource($this->fp)) { - $buf = $this->read(4); - return sprintf("%s.%s.%s.%s", ord($buf[0]), ord($buf[1]), - ord($buf[2]), ord($buf[3])); - } - return $this->raiseError("not connected"); - } - // }}} - - // {{{ readLine() - /** - * Read until either the end of the socket or a newline, whichever - * comes first. Strips the trailing newline from the returned data. - * - * @access public - * @return All available data up to a newline, without that - * newline, or until the end of the socket, or a PEAR_Error if - * not connected. - */ - function readLine() - { - if (is_resource($this->fp)) { - $line = ''; - $timeout = time() + $this->timeout; - while (!$this->eof() && (!$this->timeout || time() < $timeout)) { - $line .= $this->gets($this->lineLength); - if (substr($line, -2) == "\r\n" || - substr($line, -1) == "\n") { - return rtrim($line, "\r\n"); - } - } - return $line; - } - return $this->raiseError("not connected"); - } - // }}} - - // {{{ readAll() - /** - * Read until the socket closes. THIS FUNCTION WILL NOT EXIT if the - * socket is in blocking mode until the socket closes. - * - * @access public - * @return All data until the socket closes, or a PEAR_Error if - * not connected. - */ - function readAll() - { - if (is_resource($this->fp)) { - $data = ''; - while (!$this->eof()) - $data .= $this->read($this->lineLength); - return $data; - } - return $this->raiseError("not connected"); - } - // }}} - -} diff --git a/program/lib/PEAR.php b/program/lib/PEAR.php deleted file mode 100644 index 0c0a51b..0000000 --- a/program/lib/PEAR.php +++ /dev/null @@ -1,1101 +0,0 @@ - - * @author Stig Bakken - * @author Tomas V.V.Cox - * @author Greg Beaver - * @copyright 1997-2006 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: PEAR.php 157 2006-03-03 16:15:07Z roundcube $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/**#@+ - * ERROR constants - */ -define('PEAR_ERROR_RETURN', 1); -define('PEAR_ERROR_PRINT', 2); -define('PEAR_ERROR_TRIGGER', 4); -define('PEAR_ERROR_DIE', 8); -define('PEAR_ERROR_CALLBACK', 16); -/** - * WARNING: obsolete - * @deprecated - */ -define('PEAR_ERROR_EXCEPTION', 32); -/**#@-*/ -define('PEAR_ZE2', (function_exists('version_compare') && - version_compare(zend_version(), "2-dev", "ge"))); - -if (substr(PHP_OS, 0, 3) == 'WIN') { - define('OS_WINDOWS', true); - define('OS_UNIX', false); - define('PEAR_OS', 'Windows'); -} else { - define('OS_WINDOWS', false); - define('OS_UNIX', true); - define('PEAR_OS', 'Unix'); // blatant assumption -} - -// instant backwards compatibility -if (!defined('PATH_SEPARATOR')) { - if (OS_WINDOWS) { - define('PATH_SEPARATOR', ';'); - } else { - define('PATH_SEPARATOR', ':'); - } -} - -$GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN; -$GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE; -$GLOBALS['_PEAR_destructor_object_list'] = array(); -$GLOBALS['_PEAR_shutdown_funcs'] = array(); -$GLOBALS['_PEAR_error_handler_stack'] = array(); - -@ini_set('track_errors', true); - -/** - * Base class for other PEAR classes. Provides rudimentary - * emulation of destructors. - * - * If you want a destructor in your class, inherit PEAR and make a - * destructor method called _yourclassname (same name as the - * constructor, but with a "_" prefix). Also, in your constructor you - * have to call the PEAR constructor: $this->PEAR();. - * The destructor method will be called without parameters. Note that - * at in some SAPI implementations (such as Apache), any output during - * the request shutdown (in which destructors are called) seems to be - * discarded. If you need to get any debug information from your - * destructor, use error_log(), syslog() or something similar. - * - * IMPORTANT! To use the emulated destructors you need to create the - * objects by reference: $obj =& new PEAR_child; - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Tomas V.V. Cox - * @author Greg Beaver - * @copyright 1997-2006 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.7 - * @link http://pear.php.net/package/PEAR - * @see PEAR_Error - * @since Class available since PHP 4.0.2 - * @link http://pear.php.net/manual/en/core.pear.php#core.pear.pear - */ -class PEAR -{ - // {{{ properties - - /** - * Whether to enable internal debug messages. - * - * @var bool - * @access private - */ - var $_debug = false; - - /** - * Default error mode for this object. - * - * @var int - * @access private - */ - var $_default_error_mode = null; - - /** - * Default error options used for this object when error mode - * is PEAR_ERROR_TRIGGER. - * - * @var int - * @access private - */ - var $_default_error_options = null; - - /** - * Default error handler (callback) for this object, if error mode is - * PEAR_ERROR_CALLBACK. - * - * @var string - * @access private - */ - var $_default_error_handler = ''; - - /** - * Which class to use for error objects. - * - * @var string - * @access private - */ - var $_error_class = 'PEAR_Error'; - - /** - * An array of expected errors. - * - * @var array - * @access private - */ - var $_expected_errors = array(); - - // }}} - - // {{{ constructor - - /** - * Constructor. Registers this object in - * $_PEAR_destructor_object_list for destructor emulation if a - * destructor object exists. - * - * @param string $error_class (optional) which class to use for - * error objects, defaults to PEAR_Error. - * @access public - * @return void - */ - function PEAR($error_class = null) - { - $classname = strtolower(get_class($this)); - if ($this->_debug) { - print "PEAR constructor called, class=$classname\n"; - } - if ($error_class !== null) { - $this->_error_class = $error_class; - } - while ($classname && strcasecmp($classname, "pear")) { - $destructor = "_$classname"; - if (method_exists($this, $destructor)) { - global $_PEAR_destructor_object_list; - $_PEAR_destructor_object_list[] = &$this; - if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { - register_shutdown_function("_PEAR_call_destructors"); - $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; - } - break; - } else { - $classname = get_parent_class($classname); - } - } - } - - // }}} - // {{{ destructor - - /** - * Destructor (the emulated type of...). Does nothing right now, - * but is included for forward compatibility, so subclass - * destructors should always call it. - * - * See the note in the class desciption about output from - * destructors. - * - * @access public - * @return void - */ - function _PEAR() { - if ($this->_debug) { - printf("PEAR destructor called, class=%s\n", strtolower(get_class($this))); - } - } - - // }}} - // {{{ getStaticProperty() - - /** - * If you have a class that's mostly/entirely static, and you need static - * properties, you can use this method to simulate them. Eg. in your method(s) - * do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar'); - * You MUST use a reference, or they will not persist! - * - * @access public - * @param string $class The calling classname, to prevent clashes - * @param string $var The variable to retrieve. - * @return mixed A reference to the variable. If not set it will be - * auto initialised to NULL. - */ - function &getStaticProperty($class, $var) - { - static $properties; - return $properties[$class][$var]; - } - - // }}} - // {{{ registerShutdownFunc() - - /** - * Use this function to register a shutdown method for static - * classes. - * - * @access public - * @param mixed $func The function name (or array of class/method) to call - * @param mixed $args The arguments to pass to the function - * @return void - */ - function registerShutdownFunc($func, $args = array()) - { - // if we are called statically, there is a potential - // that no shutdown func is registered. Bug #6445 - if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { - register_shutdown_function("_PEAR_call_destructors"); - $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; - } - $GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args); - } - - // }}} - // {{{ isError() - - /** - * Tell whether a value is a PEAR error. - * - * @param mixed $data the value to test - * @param int $code if $data is an error object, return true - * only if $code is a string and - * $obj->getMessage() == $code or - * $code is an integer and $obj->getCode() == $code - * @access public - * @return bool true if parameter is an error - */ - function isError($data, $code = null) - { - if (is_a($data, 'PEAR_Error')) { - if (is_null($code)) { - return true; - } elseif (is_string($code)) { - return $data->getMessage() == $code; - } else { - return $data->getCode() == $code; - } - } - return false; - } - - // }}} - // {{{ setErrorHandling() - - /** - * Sets how errors generated by this object should be handled. - * Can be invoked both in objects and statically. If called - * statically, setErrorHandling sets the default behaviour for all - * PEAR objects. If called in an object, setErrorHandling sets - * the default behaviour for that object. - * - * @param int $mode - * One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT, - * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE, - * PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION. - * - * @param mixed $options - * When $mode is PEAR_ERROR_TRIGGER, this is the error level (one - * of E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR). - * - * When $mode is PEAR_ERROR_CALLBACK, this parameter is expected - * to be the callback function or method. A callback - * function is a string with the name of the function, a - * callback method is an array of two elements: the element - * at index 0 is the object, and the element at index 1 is - * the name of the method to call in the object. - * - * When $mode is PEAR_ERROR_PRINT or PEAR_ERROR_DIE, this is - * a printf format string used when printing the error - * message. - * - * @access public - * @return void - * @see PEAR_ERROR_RETURN - * @see PEAR_ERROR_PRINT - * @see PEAR_ERROR_TRIGGER - * @see PEAR_ERROR_DIE - * @see PEAR_ERROR_CALLBACK - * @see PEAR_ERROR_EXCEPTION - * - * @since PHP 4.0.5 - */ - - function setErrorHandling($mode = null, $options = null) - { - if (isset($this) && is_a($this, 'PEAR')) { - $setmode = &$this->_default_error_mode; - $setoptions = &$this->_default_error_options; - } else { - $setmode = &$GLOBALS['_PEAR_default_error_mode']; - $setoptions = &$GLOBALS['_PEAR_default_error_options']; - } - - switch ($mode) { - case PEAR_ERROR_EXCEPTION: - case PEAR_ERROR_RETURN: - case PEAR_ERROR_PRINT: - case PEAR_ERROR_TRIGGER: - case PEAR_ERROR_DIE: - case null: - $setmode = $mode; - $setoptions = $options; - break; - - case PEAR_ERROR_CALLBACK: - $setmode = $mode; - // class/object method callback - if (is_callable($options)) { - $setoptions = $options; - } else { - trigger_error("invalid error callback", E_USER_WARNING); - } - break; - - default: - trigger_error("invalid error mode", E_USER_WARNING); - break; - } - } - - // }}} - // {{{ expectError() - - /** - * This method is used to tell which errors you expect to get. - * Expected errors are always returned with error mode - * PEAR_ERROR_RETURN. Expected error codes are stored in a stack, - * and this method pushes a new element onto it. The list of - * expected errors are in effect until they are popped off the - * stack with the popExpect() method. - * - * Note that this method can not be called statically - * - * @param mixed $code a single error code or an array of error codes to expect - * - * @return int the new depth of the "expected errors" stack - * @access public - */ - function expectError($code = '*') - { - if (is_array($code)) { - array_push($this->_expected_errors, $code); - } else { - array_push($this->_expected_errors, array($code)); - } - return sizeof($this->_expected_errors); - } - - // }}} - // {{{ popExpect() - - /** - * This method pops one element off the expected error codes - * stack. - * - * @return array the list of error codes that were popped - */ - function popExpect() - { - return array_pop($this->_expected_errors); - } - - // }}} - // {{{ _checkDelExpect() - - /** - * This method checks unsets an error code if available - * - * @param mixed error code - * @return bool true if the error code was unset, false otherwise - * @access private - * @since PHP 4.3.0 - */ - function _checkDelExpect($error_code) - { - $deleted = false; - - foreach ($this->_expected_errors AS $key => $error_array) { - if (in_array($error_code, $error_array)) { - unset($this->_expected_errors[$key][array_search($error_code, $error_array)]); - $deleted = true; - } - - // clean up empty arrays - if (0 == count($this->_expected_errors[$key])) { - unset($this->_expected_errors[$key]); - } - } - return $deleted; - } - - // }}} - // {{{ delExpect() - - /** - * This method deletes all occurences of the specified element from - * the expected error codes stack. - * - * @param mixed $error_code error code that should be deleted - * @return mixed list of error codes that were deleted or error - * @access public - * @since PHP 4.3.0 - */ - function delExpect($error_code) - { - $deleted = false; - - if ((is_array($error_code) && (0 != count($error_code)))) { - // $error_code is a non-empty array here; - // we walk through it trying to unset all - // values - foreach($error_code as $key => $error) { - if ($this->_checkDelExpect($error)) { - $deleted = true; - } else { - $deleted = false; - } - } - return $deleted ? true : PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME - } elseif (!empty($error_code)) { - // $error_code comes alone, trying to unset it - if ($this->_checkDelExpect($error_code)) { - return true; - } else { - return PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME - } - } else { - // $error_code is empty - return PEAR::raiseError("The expected error you submitted is empty"); // IMPROVE ME - } - } - - // }}} - // {{{ raiseError() - - /** - * This method is a wrapper that returns an instance of the - * configured error class with this object's default error - * handling applied. If the $mode and $options parameters are not - * specified, the object's defaults are used. - * - * @param mixed $message a text error message or a PEAR error object - * - * @param int $code a numeric error code (it is up to your class - * to define these if you want to use codes) - * - * @param int $mode One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT, - * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE, - * PEAR_ERROR_CALLBACK, PEAR_ERROR_EXCEPTION. - * - * @param mixed $options If $mode is PEAR_ERROR_TRIGGER, this parameter - * specifies the PHP-internal error level (one of - * E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR). - * If $mode is PEAR_ERROR_CALLBACK, this - * parameter specifies the callback function or - * method. In other error modes this parameter - * is ignored. - * - * @param string $userinfo If you need to pass along for example debug - * information, this parameter is meant for that. - * - * @param string $error_class The returned error object will be - * instantiated from this class, if specified. - * - * @param bool $skipmsg If true, raiseError will only pass error codes, - * the error message parameter will be dropped. - * - * @access public - * @return object a PEAR error object - * @see PEAR::setErrorHandling - * @since PHP 4.0.5 - */ - function &raiseError($message = null, - $code = null, - $mode = null, - $options = null, - $userinfo = null, - $error_class = null, - $skipmsg = false) - { - // The error is yet a PEAR error object - if (is_object($message)) { - $code = $message->getCode(); - $userinfo = $message->getUserInfo(); - $error_class = $message->getType(); - $message->error_message_prefix = ''; - $message = $message->getMessage(); - } - - if (isset($this) && isset($this->_expected_errors) && sizeof($this->_expected_errors) > 0 && sizeof($exp = end($this->_expected_errors))) { - if ($exp[0] == "*" || - (is_int(reset($exp)) && in_array($code, $exp)) || - (is_string(reset($exp)) && in_array($message, $exp))) { - $mode = PEAR_ERROR_RETURN; - } - } - // No mode given, try global ones - if ($mode === null) { - // Class error handler - if (isset($this) && isset($this->_default_error_mode)) { - $mode = $this->_default_error_mode; - $options = $this->_default_error_options; - // Global error handler - } elseif (isset($GLOBALS['_PEAR_default_error_mode'])) { - $mode = $GLOBALS['_PEAR_default_error_mode']; - $options = $GLOBALS['_PEAR_default_error_options']; - } - } - - if ($error_class !== null) { - $ec = $error_class; - } elseif (isset($this) && isset($this->_error_class)) { - $ec = $this->_error_class; - } else { - $ec = 'PEAR_Error'; - } - if ($skipmsg) { - $a = &new $ec($code, $mode, $options, $userinfo); - return $a; - } else { - $a = &new $ec($message, $code, $mode, $options, $userinfo); - return $a; - } - } - - // }}} - // {{{ throwError() - - /** - * Simpler form of raiseError with fewer options. In most cases - * message, code and userinfo are enough. - * - * @param string $message - * - */ - function &throwError($message = null, - $code = null, - $userinfo = null) - { - if (isset($this) && is_a($this, 'PEAR')) { - $a = &$this->raiseError($message, $code, null, null, $userinfo); - return $a; - } else { - $a = &PEAR::raiseError($message, $code, null, null, $userinfo); - return $a; - } - } - - // }}} - function staticPushErrorHandling($mode, $options = null) - { - $stack = &$GLOBALS['_PEAR_error_handler_stack']; - $def_mode = &$GLOBALS['_PEAR_default_error_mode']; - $def_options = &$GLOBALS['_PEAR_default_error_options']; - $stack[] = array($def_mode, $def_options); - switch ($mode) { - case PEAR_ERROR_EXCEPTION: - case PEAR_ERROR_RETURN: - case PEAR_ERROR_PRINT: - case PEAR_ERROR_TRIGGER: - case PEAR_ERROR_DIE: - case null: - $def_mode = $mode; - $def_options = $options; - break; - - case PEAR_ERROR_CALLBACK: - $def_mode = $mode; - // class/object method callback - if (is_callable($options)) { - $def_options = $options; - } else { - trigger_error("invalid error callback", E_USER_WARNING); - } - break; - - default: - trigger_error("invalid error mode", E_USER_WARNING); - break; - } - $stack[] = array($mode, $options); - return true; - } - - function staticPopErrorHandling() - { - $stack = &$GLOBALS['_PEAR_error_handler_stack']; - $setmode = &$GLOBALS['_PEAR_default_error_mode']; - $setoptions = &$GLOBALS['_PEAR_default_error_options']; - array_pop($stack); - list($mode, $options) = $stack[sizeof($stack) - 1]; - array_pop($stack); - switch ($mode) { - case PEAR_ERROR_EXCEPTION: - case PEAR_ERROR_RETURN: - case PEAR_ERROR_PRINT: - case PEAR_ERROR_TRIGGER: - case PEAR_ERROR_DIE: - case null: - $setmode = $mode; - $setoptions = $options; - break; - - case PEAR_ERROR_CALLBACK: - $setmode = $mode; - // class/object method callback - if (is_callable($options)) { - $setoptions = $options; - } else { - trigger_error("invalid error callback", E_USER_WARNING); - } - break; - - default: - trigger_error("invalid error mode", E_USER_WARNING); - break; - } - return true; - } - - // {{{ pushErrorHandling() - - /** - * Push a new error handler on top of the error handler options stack. With this - * you can easily override the actual error handler for some code and restore - * it later with popErrorHandling. - * - * @param mixed $mode (same as setErrorHandling) - * @param mixed $options (same as setErrorHandling) - * - * @return bool Always true - * - * @see PEAR::setErrorHandling - */ - function pushErrorHandling($mode, $options = null) - { - $stack = &$GLOBALS['_PEAR_error_handler_stack']; - if (isset($this) && is_a($this, 'PEAR')) { - $def_mode = &$this->_default_error_mode; - $def_options = &$this->_default_error_options; - } else { - $def_mode = &$GLOBALS['_PEAR_default_error_mode']; - $def_options = &$GLOBALS['_PEAR_default_error_options']; - } - $stack[] = array($def_mode, $def_options); - - if (isset($this) && is_a($this, 'PEAR')) { - $this->setErrorHandling($mode, $options); - } else { - PEAR::setErrorHandling($mode, $options); - } - $stack[] = array($mode, $options); - return true; - } - - // }}} - // {{{ popErrorHandling() - - /** - * Pop the last error handler used - * - * @return bool Always true - * - * @see PEAR::pushErrorHandling - */ - function popErrorHandling() - { - $stack = &$GLOBALS['_PEAR_error_handler_stack']; - array_pop($stack); - list($mode, $options) = $stack[sizeof($stack) - 1]; - array_pop($stack); - if (isset($this) && is_a($this, 'PEAR')) { - $this->setErrorHandling($mode, $options); - } else { - PEAR::setErrorHandling($mode, $options); - } - return true; - } - - // }}} - // {{{ loadExtension() - - /** - * OS independant PHP extension load. Remember to take care - * on the correct extension name for case sensitive OSes. - * - * @param string $ext The extension name - * @return bool Success or not on the dl() call - */ - function loadExtension($ext) - { - if (!extension_loaded($ext)) { - // if either returns true dl() will produce a FATAL error, stop that - if ((ini_get('enable_dl') != 1) || (ini_get('safe_mode') == 1)) { - return false; - } - if (OS_WINDOWS) { - $suffix = '.dll'; - } elseif (PHP_OS == 'HP-UX') { - $suffix = '.sl'; - } elseif (PHP_OS == 'AIX') { - $suffix = '.a'; - } elseif (PHP_OS == 'OSX') { - $suffix = '.bundle'; - } else { - $suffix = '.so'; - } - return @dl('php_'.$ext.$suffix) || @dl($ext.$suffix); - } - return true; - } - - // }}} -} - -// {{{ _PEAR_call_destructors() - -function _PEAR_call_destructors() -{ - global $_PEAR_destructor_object_list; - if (is_array($_PEAR_destructor_object_list) && - sizeof($_PEAR_destructor_object_list)) - { - reset($_PEAR_destructor_object_list); - if (@PEAR::getStaticProperty('PEAR', 'destructlifo')) { - $_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list); - } - while (list($k, $objref) = each($_PEAR_destructor_object_list)) { - $classname = get_class($objref); - while ($classname) { - $destructor = "_$classname"; - if (method_exists($objref, $destructor)) { - $objref->$destructor(); - break; - } else { - $classname = get_parent_class($classname); - } - } - } - // Empty the object list to ensure that destructors are - // not called more than once. - $_PEAR_destructor_object_list = array(); - } - - // Now call the shutdown functions - if (is_array($GLOBALS['_PEAR_shutdown_funcs']) AND !empty($GLOBALS['_PEAR_shutdown_funcs'])) { - foreach ($GLOBALS['_PEAR_shutdown_funcs'] as $value) { - call_user_func_array($value[0], $value[1]); - } - } -} - -// }}} -/** - * Standard PEAR error class for PHP 4 - * - * This class is supserseded by {@link PEAR_Exception} in PHP 5 - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Tomas V.V. Cox - * @author Gregory Beaver - * @copyright 1997-2006 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.7 - * @link http://pear.php.net/manual/en/core.pear.pear-error.php - * @see PEAR::raiseError(), PEAR::throwError() - * @since Class available since PHP 4.0.2 - */ -class PEAR_Error -{ - // {{{ properties - - var $error_message_prefix = ''; - var $mode = PEAR_ERROR_RETURN; - var $level = E_USER_NOTICE; - var $code = -1; - var $message = ''; - var $userinfo = ''; - var $backtrace = null; - - // }}} - // {{{ constructor - - /** - * PEAR_Error constructor - * - * @param string $message message - * - * @param int $code (optional) error code - * - * @param int $mode (optional) error mode, one of: PEAR_ERROR_RETURN, - * PEAR_ERROR_PRINT, PEAR_ERROR_DIE, PEAR_ERROR_TRIGGER, - * PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION - * - * @param mixed $options (optional) error level, _OR_ in the case of - * PEAR_ERROR_CALLBACK, the callback function or object/method - * tuple. - * - * @param string $userinfo (optional) additional user/debug info - * - * @access public - * - */ - function PEAR_Error($message = 'unknown error', $code = null, - $mode = null, $options = null, $userinfo = null) - { - if ($mode === null) { - $mode = PEAR_ERROR_RETURN; - } - $this->message = $message; - $this->code = $code; - $this->mode = $mode; - $this->userinfo = $userinfo; - if (function_exists("debug_backtrace")) { - if (@!PEAR::getStaticProperty('PEAR_Error', 'skiptrace')) { - $this->backtrace = debug_backtrace(); - } - } - if ($mode & PEAR_ERROR_CALLBACK) { - $this->level = E_USER_NOTICE; - $this->callback = $options; - } else { - if ($options === null) { - $options = E_USER_NOTICE; - } - $this->level = $options; - $this->callback = null; - } - if ($this->mode & PEAR_ERROR_PRINT) { - if (is_null($options) || is_int($options)) { - $format = "%s"; - } else { - $format = $options; - } - printf($format, $this->getMessage()); - } - if ($this->mode & PEAR_ERROR_TRIGGER) { - trigger_error($this->getMessage(), $this->level); - } - if ($this->mode & PEAR_ERROR_DIE) { - $msg = $this->getMessage(); - if (is_null($options) || is_int($options)) { - $format = "%s"; - if (substr($msg, -1) != "\n") { - $msg .= "\n"; - } - } else { - $format = $options; - } - die(sprintf($format, $msg)); - } - if ($this->mode & PEAR_ERROR_CALLBACK) { - if (is_callable($this->callback)) { - call_user_func($this->callback, $this); - } - } - if ($this->mode & PEAR_ERROR_EXCEPTION) { - trigger_error("PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_Exception for exceptions", E_USER_WARNING); - eval('$e = new Exception($this->message, $this->code);throw($e);'); - } - } - - // }}} - // {{{ getMode() - - /** - * Get the error mode from an error object. - * - * @return int error mode - * @access public - */ - function getMode() { - return $this->mode; - } - - // }}} - // {{{ getCallback() - - /** - * Get the callback function/method from an error object. - * - * @return mixed callback function or object/method array - * @access public - */ - function getCallback() { - return $this->callback; - } - - // }}} - // {{{ getMessage() - - - /** - * Get the error message from an error object. - * - * @return string full error message - * @access public - */ - function getMessage() - { - return ($this->error_message_prefix . $this->message); - } - - - // }}} - // {{{ getCode() - - /** - * Get error code from an error object - * - * @return int error code - * @access public - */ - function getCode() - { - return $this->code; - } - - // }}} - // {{{ getType() - - /** - * Get the name of this error/exception. - * - * @return string error/exception name (type) - * @access public - */ - function getType() - { - return get_class($this); - } - - // }}} - // {{{ getUserInfo() - - /** - * Get additional user-supplied information. - * - * @return string user-supplied information - * @access public - */ - function getUserInfo() - { - return $this->userinfo; - } - - // }}} - // {{{ getDebugInfo() - - /** - * Get additional debug information supplied by the application. - * - * @return string debug information - * @access public - */ - function getDebugInfo() - { - return $this->getUserInfo(); - } - - // }}} - // {{{ getBacktrace() - - /** - * Get the call backtrace from where the error was generated. - * Supported with PHP 4.3.0 or newer. - * - * @param int $frame (optional) what frame to fetch - * @return array Backtrace, or NULL if not available. - * @access public - */ - function getBacktrace($frame = null) - { - if (defined('PEAR_IGNORE_BACKTRACE')) { - return null; - } - if ($frame === null) { - return $this->backtrace; - } - return $this->backtrace[$frame]; - } - - // }}} - // {{{ addUserInfo() - - function addUserInfo($info) - { - if (empty($this->userinfo)) { - $this->userinfo = $info; - } else { - $this->userinfo .= " ** $info"; - } - } - - // }}} - // {{{ toString() - - /** - * Make a string representation of this object. - * - * @return string a string with an object summary - * @access public - */ - function toString() { - $modes = array(); - $levels = array(E_USER_NOTICE => 'notice', - E_USER_WARNING => 'warning', - E_USER_ERROR => 'error'); - if ($this->mode & PEAR_ERROR_CALLBACK) { - if (is_array($this->callback)) { - $callback = (is_object($this->callback[0]) ? - strtolower(get_class($this->callback[0])) : - $this->callback[0]) . '::' . - $this->callback[1]; - } else { - $callback = $this->callback; - } - return sprintf('[%s: message="%s" code=%d mode=callback '. - 'callback=%s prefix="%s" info="%s"]', - strtolower(get_class($this)), $this->message, $this->code, - $callback, $this->error_message_prefix, - $this->userinfo); - } - if ($this->mode & PEAR_ERROR_PRINT) { - $modes[] = 'print'; - } - if ($this->mode & PEAR_ERROR_TRIGGER) { - $modes[] = 'trigger'; - } - if ($this->mode & PEAR_ERROR_DIE) { - $modes[] = 'die'; - } - if ($this->mode & PEAR_ERROR_RETURN) { - $modes[] = 'return'; - } - return sprintf('[%s: message="%s" code=%d mode=%s level=%s '. - 'prefix="%s" info="%s"]', - strtolower(get_class($this)), $this->message, $this->code, - implode("|", $modes), $levels[$this->level], - $this->error_message_prefix, - $this->userinfo); - } - - // }}} -} - -/* - * Local Variables: - * mode: php - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ -?> diff --git a/program/lib/encoding/CP1250.map b/program/lib/encoding/CP1250.map deleted file mode 100644 index 081d776..0000000 --- a/program/lib/encoding/CP1250.map +++ /dev/null @@ -1,274 +0,0 @@ -# -# Name: cp1250 to Unicode table -# Unicode version: 2.0 -# Table version: 2.01 -# Table format: Format A -# Date: 04/15/98 -# -# Contact: cpxlate@microsoft.com -# -# General notes: none -# -# Format: Three tab-separated columns -# Column #1 is the cp1250 code (in hex) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 is the Unicode name (follows a comment sign, '#') -# -# The entries are in cp1250 order -# -0x00 0x0000 #NULL -0x01 0x0001 #START OF HEADING -0x02 0x0002 #START OF TEXT -0x03 0x0003 #END OF TEXT -0x04 0x0004 #END OF TRANSMISSION -0x05 0x0005 #ENQUIRY -0x06 0x0006 #ACKNOWLEDGE -0x07 0x0007 #BELL -0x08 0x0008 #BACKSPACE -0x09 0x0009 #HORIZONTAL TABULATION -0x0A 0x000A #LINE FEED -0x0B 0x000B #VERTICAL TABULATION -0x0C 0x000C #FORM FEED -0x0D 0x000D #CARRIAGE RETURN -0x0E 0x000E #SHIFT OUT -0x0F 0x000F #SHIFT IN -0x10 0x0010 #DATA LINK ESCAPE -0x11 0x0011 #DEVICE CONTROL ONE -0x12 0x0012 #DEVICE CONTROL TWO -0x13 0x0013 #DEVICE CONTROL THREE -0x14 0x0014 #DEVICE CONTROL FOUR -0x15 0x0015 #NEGATIVE ACKNOWLEDGE -0x16 0x0016 #SYNCHRONOUS IDLE -0x17 0x0017 #END OF TRANSMISSION BLOCK -0x18 0x0018 #CANCEL -0x19 0x0019 #END OF MEDIUM -0x1A 0x001A #SUBSTITUTE -0x1B 0x001B #ESCAPE -0x1C 0x001C #FILE SEPARATOR -0x1D 0x001D #GROUP SEPARATOR -0x1E 0x001E #RECORD SEPARATOR -0x1F 0x001F #UNIT SEPARATOR -0x20 0x0020 #SPACE -0x21 0x0021 #EXCLAMATION MARK -0x22 0x0022 #QUOTATION MARK -0x23 0x0023 #NUMBER SIGN -0x24 0x0024 #DOLLAR SIGN -0x25 0x0025 #PERCENT SIGN -0x26 0x0026 #AMPERSAND -0x27 0x0027 #APOSTROPHE -0x28 0x0028 #LEFT PARENTHESIS -0x29 0x0029 #RIGHT PARENTHESIS -0x2A 0x002A #ASTERISK -0x2B 0x002B #PLUS SIGN -0x2C 0x002C #COMMA -0x2D 0x002D #HYPHEN-MINUS -0x2E 0x002E #FULL STOP -0x2F 0x002F #SOLIDUS -0x30 0x0030 #DIGIT ZERO -0x31 0x0031 #DIGIT ONE -0x32 0x0032 #DIGIT TWO -0x33 0x0033 #DIGIT THREE -0x34 0x0034 #DIGIT FOUR -0x35 0x0035 #DIGIT FIVE -0x36 0x0036 #DIGIT SIX -0x37 0x0037 #DIGIT SEVEN -0x38 0x0038 #DIGIT EIGHT -0x39 0x0039 #DIGIT NINE -0x3A 0x003A #COLON -0x3B 0x003B #SEMICOLON -0x3C 0x003C #LESS-THAN SIGN -0x3D 0x003D #EQUALS SIGN -0x3E 0x003E #GREATER-THAN SIGN -0x3F 0x003F #QUESTION MARK -0x40 0x0040 #COMMERCIAL AT -0x41 0x0041 #LATIN CAPITAL LETTER A -0x42 0x0042 #LATIN CAPITAL LETTER B -0x43 0x0043 #LATIN CAPITAL LETTER C -0x44 0x0044 #LATIN CAPITAL LETTER D -0x45 0x0045 #LATIN CAPITAL LETTER E -0x46 0x0046 #LATIN CAPITAL LETTER F -0x47 0x0047 #LATIN CAPITAL LETTER G -0x48 0x0048 #LATIN CAPITAL LETTER H -0x49 0x0049 #LATIN CAPITAL LETTER I -0x4A 0x004A #LATIN CAPITAL LETTER J -0x4B 0x004B #LATIN CAPITAL LETTER K -0x4C 0x004C #LATIN CAPITAL LETTER L -0x4D 0x004D #LATIN CAPITAL LETTER M -0x4E 0x004E #LATIN CAPITAL LETTER N -0x4F 0x004F #LATIN CAPITAL LETTER O -0x50 0x0050 #LATIN CAPITAL LETTER P -0x51 0x0051 #LATIN CAPITAL LETTER Q -0x52 0x0052 #LATIN CAPITAL LETTER R -0x53 0x0053 #LATIN CAPITAL LETTER S -0x54 0x0054 #LATIN CAPITAL LETTER T -0x55 0x0055 #LATIN CAPITAL LETTER U -0x56 0x0056 #LATIN CAPITAL LETTER V -0x57 0x0057 #LATIN CAPITAL LETTER W -0x58 0x0058 #LATIN CAPITAL LETTER X -0x59 0x0059 #LATIN CAPITAL LETTER Y -0x5A 0x005A #LATIN CAPITAL LETTER Z -0x5B 0x005B #LEFT SQUARE BRACKET -0x5C 0x005C #REVERSE SOLIDUS -0x5D 0x005D #RIGHT SQUARE BRACKET -0x5E 0x005E #CIRCUMFLEX ACCENT -0x5F 0x005F #LOW LINE -0x60 0x0060 #GRAVE ACCENT -0x61 0x0061 #LATIN SMALL LETTER A -0x62 0x0062 #LATIN SMALL LETTER B -0x63 0x0063 #LATIN SMALL LETTER C -0x64 0x0064 #LATIN SMALL LETTER D -0x65 0x0065 #LATIN SMALL LETTER E -0x66 0x0066 #LATIN SMALL LETTER F -0x67 0x0067 #LATIN SMALL LETTER G -0x68 0x0068 #LATIN SMALL LETTER H -0x69 0x0069 #LATIN SMALL LETTER I -0x6A 0x006A #LATIN SMALL LETTER J -0x6B 0x006B #LATIN SMALL LETTER K -0x6C 0x006C #LATIN SMALL LETTER L -0x6D 0x006D #LATIN SMALL LETTER M -0x6E 0x006E #LATIN SMALL LETTER N -0x6F 0x006F #LATIN SMALL LETTER O -0x70 0x0070 #LATIN SMALL LETTER P -0x71 0x0071 #LATIN SMALL LETTER Q -0x72 0x0072 #LATIN SMALL LETTER R -0x73 0x0073 #LATIN SMALL LETTER S -0x74 0x0074 #LATIN SMALL LETTER T -0x75 0x0075 #LATIN SMALL LETTER U -0x76 0x0076 #LATIN SMALL LETTER V -0x77 0x0077 #LATIN SMALL LETTER W -0x78 0x0078 #LATIN SMALL LETTER X -0x79 0x0079 #LATIN SMALL LETTER Y -0x7A 0x007A #LATIN SMALL LETTER Z -0x7B 0x007B #LEFT CURLY BRACKET -0x7C 0x007C #VERTICAL LINE -0x7D 0x007D #RIGHT CURLY BRACKET -0x7E 0x007E #TILDE -0x7F 0x007F #DELETE -0x80 0x20AC #EURO SIGN -0x81 #UNDEFINED -0x82 0x201A #SINGLE LOW-9 QUOTATION MARK -0x83 #UNDEFINED -0x84 0x201E #DOUBLE LOW-9 QUOTATION MARK -0x85 0x2026 #HORIZONTAL ELLIPSIS -0x86 0x2020 #DAGGER -0x87 0x2021 #DOUBLE DAGGER -0x88 #UNDEFINED -0x89 0x2030 #PER MILLE SIGN -0x8A 0x0160 #LATIN CAPITAL LETTER S WITH CARON -0x8B 0x2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK -0x8C 0x015A #LATIN CAPITAL LETTER S WITH ACUTE -0x8D 0x0164 #LATIN CAPITAL LETTER T WITH CARON -0x8E 0x017D #LATIN CAPITAL LETTER Z WITH CARON -0x8F 0x0179 #LATIN CAPITAL LETTER Z WITH ACUTE -0x90 #UNDEFINED -0x91 0x2018 #LEFT SINGLE QUOTATION MARK -0x92 0x2019 #RIGHT SINGLE QUOTATION MARK -0x93 0x201C #LEFT DOUBLE QUOTATION MARK -0x94 0x201D #RIGHT DOUBLE QUOTATION MARK -0x95 0x2022 #BULLET -0x96 0x2013 #EN DASH -0x97 0x2014 #EM DASH -0x98 #UNDEFINED -0x99 0x2122 #TRADE MARK SIGN -0x9A 0x0161 #LATIN SMALL LETTER S WITH CARON -0x9B 0x203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK -0x9C 0x015B #LATIN SMALL LETTER S WITH ACUTE -0x9D 0x0165 #LATIN SMALL LETTER T WITH CARON -0x9E 0x017E #LATIN SMALL LETTER Z WITH CARON -0x9F 0x017A #LATIN SMALL LETTER Z WITH ACUTE -0xA0 0x00A0 #NO-BREAK SPACE -0xA1 0x02C7 #CARON -0xA2 0x02D8 #BREVE -0xA3 0x0141 #LATIN CAPITAL LETTER L WITH STROKE -0xA4 0x00A4 #CURRENCY SIGN -0xA5 0x0104 #LATIN CAPITAL LETTER A WITH OGONEK -0xA6 0x00A6 #BROKEN BAR -0xA7 0x00A7 #SECTION SIGN -0xA8 0x00A8 #DIAERESIS -0xA9 0x00A9 #COPYRIGHT SIGN -0xAA 0x015E #LATIN CAPITAL LETTER S WITH CEDILLA -0xAB 0x00AB #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC #NOT SIGN -0xAD 0x00AD #SOFT HYPHEN -0xAE 0x00AE #REGISTERED SIGN -0xAF 0x017B #LATIN CAPITAL LETTER Z WITH DOT ABOVE -0xB0 0x00B0 #DEGREE SIGN -0xB1 0x00B1 #PLUS-MINUS SIGN -0xB2 0x02DB #OGONEK -0xB3 0x0142 #LATIN SMALL LETTER L WITH STROKE -0xB4 0x00B4 #ACUTE ACCENT -0xB5 0x00B5 #MICRO SIGN -0xB6 0x00B6 #PILCROW SIGN -0xB7 0x00B7 #MIDDLE DOT -0xB8 0x00B8 #CEDILLA -0xB9 0x0105 #LATIN SMALL LETTER A WITH OGONEK -0xBA 0x015F #LATIN SMALL LETTER S WITH CEDILLA -0xBB 0x00BB #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x013D #LATIN CAPITAL LETTER L WITH CARON -0xBD 0x02DD #DOUBLE ACUTE ACCENT -0xBE 0x013E #LATIN SMALL LETTER L WITH CARON -0xBF 0x017C #LATIN SMALL LETTER Z WITH DOT ABOVE -0xC0 0x0154 #LATIN CAPITAL LETTER R WITH ACUTE -0xC1 0x00C1 #LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 #LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC3 0x0102 #LATIN CAPITAL LETTER A WITH BREVE -0xC4 0x00C4 #LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x0139 #LATIN CAPITAL LETTER L WITH ACUTE -0xC6 0x0106 #LATIN CAPITAL LETTER C WITH ACUTE -0xC7 0x00C7 #LATIN CAPITAL LETTER C WITH CEDILLA -0xC8 0x010C #LATIN CAPITAL LETTER C WITH CARON -0xC9 0x00C9 #LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x0118 #LATIN CAPITAL LETTER E WITH OGONEK -0xCB 0x00CB #LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x011A #LATIN CAPITAL LETTER E WITH CARON -0xCD 0x00CD #LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE #LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x010E #LATIN CAPITAL LETTER D WITH CARON -0xD0 0x0110 #LATIN CAPITAL LETTER D WITH STROKE -0xD1 0x0143 #LATIN CAPITAL LETTER N WITH ACUTE -0xD2 0x0147 #LATIN CAPITAL LETTER N WITH CARON -0xD3 0x00D3 #LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x00D4 #LATIN CAPITAL LETTER O WITH CIRCUMFLEX -0xD5 0x0150 #LATIN CAPITAL LETTER O WITH DOUBLE ACUTE -0xD6 0x00D6 #LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x00D7 #MULTIPLICATION SIGN -0xD8 0x0158 #LATIN CAPITAL LETTER R WITH CARON -0xD9 0x016E #LATIN CAPITAL LETTER U WITH RING ABOVE -0xDA 0x00DA #LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x0170 #LATIN CAPITAL LETTER U WITH DOUBLE ACUTE -0xDC 0x00DC #LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x00DD #LATIN CAPITAL LETTER Y WITH ACUTE -0xDE 0x0162 #LATIN CAPITAL LETTER T WITH CEDILLA -0xDF 0x00DF #LATIN SMALL LETTER SHARP S -0xE0 0x0155 #LATIN SMALL LETTER R WITH ACUTE -0xE1 0x00E1 #LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 #LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE3 0x0103 #LATIN SMALL LETTER A WITH BREVE -0xE4 0x00E4 #LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x013A #LATIN SMALL LETTER L WITH ACUTE -0xE6 0x0107 #LATIN SMALL LETTER C WITH ACUTE -0xE7 0x00E7 #LATIN SMALL LETTER C WITH CEDILLA -0xE8 0x010D #LATIN SMALL LETTER C WITH CARON -0xE9 0x00E9 #LATIN SMALL LETTER E WITH ACUTE -0xEA 0x0119 #LATIN SMALL LETTER E WITH OGONEK -0xEB 0x00EB #LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x011B #LATIN SMALL LETTER E WITH CARON -0xED 0x00ED #LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE #LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x010F #LATIN SMALL LETTER D WITH CARON -0xF0 0x0111 #LATIN SMALL LETTER D WITH STROKE -0xF1 0x0144 #LATIN SMALL LETTER N WITH ACUTE -0xF2 0x0148 #LATIN SMALL LETTER N WITH CARON -0xF3 0x00F3 #LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 #LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x0151 #LATIN SMALL LETTER O WITH DOUBLE ACUTE -0xF6 0x00F6 #LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x00F7 #DIVISION SIGN -0xF8 0x0159 #LATIN SMALL LETTER R WITH CARON -0xF9 0x016F #LATIN SMALL LETTER U WITH RING ABOVE -0xFA 0x00FA #LATIN SMALL LETTER U WITH ACUTE -0xFB 0x0171 #LATIN SMALL LETTER U WITH DOUBLE ACUTE -0xFC 0x00FC #LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x00FD #LATIN SMALL LETTER Y WITH ACUTE -0xFE 0x0163 #LATIN SMALL LETTER T WITH CEDILLA -0xFF 0x02D9 #DOT ABOVE diff --git a/program/lib/encoding/CP1251.map b/program/lib/encoding/CP1251.map deleted file mode 100644 index e7d4f2c..0000000 --- a/program/lib/encoding/CP1251.map +++ /dev/null @@ -1,274 +0,0 @@ -# -# Name: cp1251 to Unicode table -# Unicode version: 2.0 -# Table version: 2.01 -# Table format: Format A -# Date: 04/15/98 -# -# Contact: cpxlate@microsoft.com -# -# General notes: none -# -# Format: Three tab-separated columns -# Column #1 is the cp1251 code (in hex) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 is the Unicode name (follows a comment sign, '#') -# -# The entries are in cp1251 order -# -0x00 0x0000 #NULL -0x01 0x0001 #START OF HEADING -0x02 0x0002 #START OF TEXT -0x03 0x0003 #END OF TEXT -0x04 0x0004 #END OF TRANSMISSION -0x05 0x0005 #ENQUIRY -0x06 0x0006 #ACKNOWLEDGE -0x07 0x0007 #BELL -0x08 0x0008 #BACKSPACE -0x09 0x0009 #HORIZONTAL TABULATION -0x0A 0x000A #LINE FEED -0x0B 0x000B #VERTICAL TABULATION -0x0C 0x000C #FORM FEED -0x0D 0x000D #CARRIAGE RETURN -0x0E 0x000E #SHIFT OUT -0x0F 0x000F #SHIFT IN -0x10 0x0010 #DATA LINK ESCAPE -0x11 0x0011 #DEVICE CONTROL ONE -0x12 0x0012 #DEVICE CONTROL TWO -0x13 0x0013 #DEVICE CONTROL THREE -0x14 0x0014 #DEVICE CONTROL FOUR -0x15 0x0015 #NEGATIVE ACKNOWLEDGE -0x16 0x0016 #SYNCHRONOUS IDLE -0x17 0x0017 #END OF TRANSMISSION BLOCK -0x18 0x0018 #CANCEL -0x19 0x0019 #END OF MEDIUM -0x1A 0x001A #SUBSTITUTE -0x1B 0x001B #ESCAPE -0x1C 0x001C #FILE SEPARATOR -0x1D 0x001D #GROUP SEPARATOR -0x1E 0x001E #RECORD SEPARATOR -0x1F 0x001F #UNIT SEPARATOR -0x20 0x0020 #SPACE -0x21 0x0021 #EXCLAMATION MARK -0x22 0x0022 #QUOTATION MARK -0x23 0x0023 #NUMBER SIGN -0x24 0x0024 #DOLLAR SIGN -0x25 0x0025 #PERCENT SIGN -0x26 0x0026 #AMPERSAND -0x27 0x0027 #APOSTROPHE -0x28 0x0028 #LEFT PARENTHESIS -0x29 0x0029 #RIGHT PARENTHESIS -0x2A 0x002A #ASTERISK -0x2B 0x002B #PLUS SIGN -0x2C 0x002C #COMMA -0x2D 0x002D #HYPHEN-MINUS -0x2E 0x002E #FULL STOP -0x2F 0x002F #SOLIDUS -0x30 0x0030 #DIGIT ZERO -0x31 0x0031 #DIGIT ONE -0x32 0x0032 #DIGIT TWO -0x33 0x0033 #DIGIT THREE -0x34 0x0034 #DIGIT FOUR -0x35 0x0035 #DIGIT FIVE -0x36 0x0036 #DIGIT SIX -0x37 0x0037 #DIGIT SEVEN -0x38 0x0038 #DIGIT EIGHT -0x39 0x0039 #DIGIT NINE -0x3A 0x003A #COLON -0x3B 0x003B #SEMICOLON -0x3C 0x003C #LESS-THAN SIGN -0x3D 0x003D #EQUALS SIGN -0x3E 0x003E #GREATER-THAN SIGN -0x3F 0x003F #QUESTION MARK -0x40 0x0040 #COMMERCIAL AT -0x41 0x0041 #LATIN CAPITAL LETTER A -0x42 0x0042 #LATIN CAPITAL LETTER B -0x43 0x0043 #LATIN CAPITAL LETTER C -0x44 0x0044 #LATIN CAPITAL LETTER D -0x45 0x0045 #LATIN CAPITAL LETTER E -0x46 0x0046 #LATIN CAPITAL LETTER F -0x47 0x0047 #LATIN CAPITAL LETTER G -0x48 0x0048 #LATIN CAPITAL LETTER H -0x49 0x0049 #LATIN CAPITAL LETTER I -0x4A 0x004A #LATIN CAPITAL LETTER J -0x4B 0x004B #LATIN CAPITAL LETTER K -0x4C 0x004C #LATIN CAPITAL LETTER L -0x4D 0x004D #LATIN CAPITAL LETTER M -0x4E 0x004E #LATIN CAPITAL LETTER N -0x4F 0x004F #LATIN CAPITAL LETTER O -0x50 0x0050 #LATIN CAPITAL LETTER P -0x51 0x0051 #LATIN CAPITAL LETTER Q -0x52 0x0052 #LATIN CAPITAL LETTER R -0x53 0x0053 #LATIN CAPITAL LETTER S -0x54 0x0054 #LATIN CAPITAL LETTER T -0x55 0x0055 #LATIN CAPITAL LETTER U -0x56 0x0056 #LATIN CAPITAL LETTER V -0x57 0x0057 #LATIN CAPITAL LETTER W -0x58 0x0058 #LATIN CAPITAL LETTER X -0x59 0x0059 #LATIN CAPITAL LETTER Y -0x5A 0x005A #LATIN CAPITAL LETTER Z -0x5B 0x005B #LEFT SQUARE BRACKET -0x5C 0x005C #REVERSE SOLIDUS -0x5D 0x005D #RIGHT SQUARE BRACKET -0x5E 0x005E #CIRCUMFLEX ACCENT -0x5F 0x005F #LOW LINE -0x60 0x0060 #GRAVE ACCENT -0x61 0x0061 #LATIN SMALL LETTER A -0x62 0x0062 #LATIN SMALL LETTER B -0x63 0x0063 #LATIN SMALL LETTER C -0x64 0x0064 #LATIN SMALL LETTER D -0x65 0x0065 #LATIN SMALL LETTER E -0x66 0x0066 #LATIN SMALL LETTER F -0x67 0x0067 #LATIN SMALL LETTER G -0x68 0x0068 #LATIN SMALL LETTER H -0x69 0x0069 #LATIN SMALL LETTER I -0x6A 0x006A #LATIN SMALL LETTER J -0x6B 0x006B #LATIN SMALL LETTER K -0x6C 0x006C #LATIN SMALL LETTER L -0x6D 0x006D #LATIN SMALL LETTER M -0x6E 0x006E #LATIN SMALL LETTER N -0x6F 0x006F #LATIN SMALL LETTER O -0x70 0x0070 #LATIN SMALL LETTER P -0x71 0x0071 #LATIN SMALL LETTER Q -0x72 0x0072 #LATIN SMALL LETTER R -0x73 0x0073 #LATIN SMALL LETTER S -0x74 0x0074 #LATIN SMALL LETTER T -0x75 0x0075 #LATIN SMALL LETTER U -0x76 0x0076 #LATIN SMALL LETTER V -0x77 0x0077 #LATIN SMALL LETTER W -0x78 0x0078 #LATIN SMALL LETTER X -0x79 0x0079 #LATIN SMALL LETTER Y -0x7A 0x007A #LATIN SMALL LETTER Z -0x7B 0x007B #LEFT CURLY BRACKET -0x7C 0x007C #VERTICAL LINE -0x7D 0x007D #RIGHT CURLY BRACKET -0x7E 0x007E #TILDE -0x7F 0x007F #DELETE -0x80 0x0402 #CYRILLIC CAPITAL LETTER DJE -0x81 0x0403 #CYRILLIC CAPITAL LETTER GJE -0x82 0x201A #SINGLE LOW-9 QUOTATION MARK -0x83 0x0453 #CYRILLIC SMALL LETTER GJE -0x84 0x201E #DOUBLE LOW-9 QUOTATION MARK -0x85 0x2026 #HORIZONTAL ELLIPSIS -0x86 0x2020 #DAGGER -0x87 0x2021 #DOUBLE DAGGER -0x88 0x20AC #EURO SIGN -0x89 0x2030 #PER MILLE SIGN -0x8A 0x0409 #CYRILLIC CAPITAL LETTER LJE -0x8B 0x2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK -0x8C 0x040A #CYRILLIC CAPITAL LETTER NJE -0x8D 0x040C #CYRILLIC CAPITAL LETTER KJE -0x8E 0x040B #CYRILLIC CAPITAL LETTER TSHE -0x8F 0x040F #CYRILLIC CAPITAL LETTER DZHE -0x90 0x0452 #CYRILLIC SMALL LETTER DJE -0x91 0x2018 #LEFT SINGLE QUOTATION MARK -0x92 0x2019 #RIGHT SINGLE QUOTATION MARK -0x93 0x201C #LEFT DOUBLE QUOTATION MARK -0x94 0x201D #RIGHT DOUBLE QUOTATION MARK -0x95 0x2022 #BULLET -0x96 0x2013 #EN DASH -0x97 0x2014 #EM DASH -0x98 #UNDEFINED -0x99 0x2122 #TRADE MARK SIGN -0x9A 0x0459 #CYRILLIC SMALL LETTER LJE -0x9B 0x203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK -0x9C 0x045A #CYRILLIC SMALL LETTER NJE -0x9D 0x045C #CYRILLIC SMALL LETTER KJE -0x9E 0x045B #CYRILLIC SMALL LETTER TSHE -0x9F 0x045F #CYRILLIC SMALL LETTER DZHE -0xA0 0x00A0 #NO-BREAK SPACE -0xA1 0x040E #CYRILLIC CAPITAL LETTER SHORT U -0xA2 0x045E #CYRILLIC SMALL LETTER SHORT U -0xA3 0x0408 #CYRILLIC CAPITAL LETTER JE -0xA4 0x00A4 #CURRENCY SIGN -0xA5 0x0490 #CYRILLIC CAPITAL LETTER GHE WITH UPTURN -0xA6 0x00A6 #BROKEN BAR -0xA7 0x00A7 #SECTION SIGN -0xA8 0x0401 #CYRILLIC CAPITAL LETTER IO -0xA9 0x00A9 #COPYRIGHT SIGN -0xAA 0x0404 #CYRILLIC CAPITAL LETTER UKRAINIAN IE -0xAB 0x00AB #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC #NOT SIGN -0xAD 0x00AD #SOFT HYPHEN -0xAE 0x00AE #REGISTERED SIGN -0xAF 0x0407 #CYRILLIC CAPITAL LETTER YI -0xB0 0x00B0 #DEGREE SIGN -0xB1 0x00B1 #PLUS-MINUS SIGN -0xB2 0x0406 #CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I -0xB3 0x0456 #CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I -0xB4 0x0491 #CYRILLIC SMALL LETTER GHE WITH UPTURN -0xB5 0x00B5 #MICRO SIGN -0xB6 0x00B6 #PILCROW SIGN -0xB7 0x00B7 #MIDDLE DOT -0xB8 0x0451 #CYRILLIC SMALL LETTER IO -0xB9 0x2116 #NUMERO SIGN -0xBA 0x0454 #CYRILLIC SMALL LETTER UKRAINIAN IE -0xBB 0x00BB #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x0458 #CYRILLIC SMALL LETTER JE -0xBD 0x0405 #CYRILLIC CAPITAL LETTER DZE -0xBE 0x0455 #CYRILLIC SMALL LETTER DZE -0xBF 0x0457 #CYRILLIC SMALL LETTER YI -0xC0 0x0410 #CYRILLIC CAPITAL LETTER A -0xC1 0x0411 #CYRILLIC CAPITAL LETTER BE -0xC2 0x0412 #CYRILLIC CAPITAL LETTER VE -0xC3 0x0413 #CYRILLIC CAPITAL LETTER GHE -0xC4 0x0414 #CYRILLIC CAPITAL LETTER DE -0xC5 0x0415 #CYRILLIC CAPITAL LETTER IE -0xC6 0x0416 #CYRILLIC CAPITAL LETTER ZHE -0xC7 0x0417 #CYRILLIC CAPITAL LETTER ZE -0xC8 0x0418 #CYRILLIC CAPITAL LETTER I -0xC9 0x0419 #CYRILLIC CAPITAL LETTER SHORT I -0xCA 0x041A #CYRILLIC CAPITAL LETTER KA -0xCB 0x041B #CYRILLIC CAPITAL LETTER EL -0xCC 0x041C #CYRILLIC CAPITAL LETTER EM -0xCD 0x041D #CYRILLIC CAPITAL LETTER EN -0xCE 0x041E #CYRILLIC CAPITAL LETTER O -0xCF 0x041F #CYRILLIC CAPITAL LETTER PE -0xD0 0x0420 #CYRILLIC CAPITAL LETTER ER -0xD1 0x0421 #CYRILLIC CAPITAL LETTER ES -0xD2 0x0422 #CYRILLIC CAPITAL LETTER TE -0xD3 0x0423 #CYRILLIC CAPITAL LETTER U -0xD4 0x0424 #CYRILLIC CAPITAL LETTER EF -0xD5 0x0425 #CYRILLIC CAPITAL LETTER HA -0xD6 0x0426 #CYRILLIC CAPITAL LETTER TSE -0xD7 0x0427 #CYRILLIC CAPITAL LETTER CHE -0xD8 0x0428 #CYRILLIC CAPITAL LETTER SHA -0xD9 0x0429 #CYRILLIC CAPITAL LETTER SHCHA -0xDA 0x042A #CYRILLIC CAPITAL LETTER HARD SIGN -0xDB 0x042B #CYRILLIC CAPITAL LETTER YERU -0xDC 0x042C #CYRILLIC CAPITAL LETTER SOFT SIGN -0xDD 0x042D #CYRILLIC CAPITAL LETTER E -0xDE 0x042E #CYRILLIC CAPITAL LETTER YU -0xDF 0x042F #CYRILLIC CAPITAL LETTER YA -0xE0 0x0430 #CYRILLIC SMALL LETTER A -0xE1 0x0431 #CYRILLIC SMALL LETTER BE -0xE2 0x0432 #CYRILLIC SMALL LETTER VE -0xE3 0x0433 #CYRILLIC SMALL LETTER GHE -0xE4 0x0434 #CYRILLIC SMALL LETTER DE -0xE5 0x0435 #CYRILLIC SMALL LETTER IE -0xE6 0x0436 #CYRILLIC SMALL LETTER ZHE -0xE7 0x0437 #CYRILLIC SMALL LETTER ZE -0xE8 0x0438 #CYRILLIC SMALL LETTER I -0xE9 0x0439 #CYRILLIC SMALL LETTER SHORT I -0xEA 0x043A #CYRILLIC SMALL LETTER KA -0xEB 0x043B #CYRILLIC SMALL LETTER EL -0xEC 0x043C #CYRILLIC SMALL LETTER EM -0xED 0x043D #CYRILLIC SMALL LETTER EN -0xEE 0x043E #CYRILLIC SMALL LETTER O -0xEF 0x043F #CYRILLIC SMALL LETTER PE -0xF0 0x0440 #CYRILLIC SMALL LETTER ER -0xF1 0x0441 #CYRILLIC SMALL LETTER ES -0xF2 0x0442 #CYRILLIC SMALL LETTER TE -0xF3 0x0443 #CYRILLIC SMALL LETTER U -0xF4 0x0444 #CYRILLIC SMALL LETTER EF -0xF5 0x0445 #CYRILLIC SMALL LETTER HA -0xF6 0x0446 #CYRILLIC SMALL LETTER TSE -0xF7 0x0447 #CYRILLIC SMALL LETTER CHE -0xF8 0x0448 #CYRILLIC SMALL LETTER SHA -0xF9 0x0449 #CYRILLIC SMALL LETTER SHCHA -0xFA 0x044A #CYRILLIC SMALL LETTER HARD SIGN -0xFB 0x044B #CYRILLIC SMALL LETTER YERU -0xFC 0x044C #CYRILLIC SMALL LETTER SOFT SIGN -0xFD 0x044D #CYRILLIC SMALL LETTER E -0xFE 0x044E #CYRILLIC SMALL LETTER YU -0xFF 0x044F #CYRILLIC SMALL LETTER YA diff --git a/program/lib/encoding/CP1252.map b/program/lib/encoding/CP1252.map deleted file mode 100644 index 2ca4486..0000000 --- a/program/lib/encoding/CP1252.map +++ /dev/null @@ -1,274 +0,0 @@ -# -# Name: cp1252 to Unicode table -# Unicode version: 2.0 -# Table version: 2.01 -# Table format: Format A -# Date: 04/15/98 -# -# Contact: cpxlate@microsoft.com -# -# General notes: none -# -# Format: Three tab-separated columns -# Column #1 is the cp1252 code (in hex) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 is the Unicode name (follows a comment sign, '#') -# -# The entries are in cp1252 order -# -0x00 0x0000 #NULL -0x01 0x0001 #START OF HEADING -0x02 0x0002 #START OF TEXT -0x03 0x0003 #END OF TEXT -0x04 0x0004 #END OF TRANSMISSION -0x05 0x0005 #ENQUIRY -0x06 0x0006 #ACKNOWLEDGE -0x07 0x0007 #BELL -0x08 0x0008 #BACKSPACE -0x09 0x0009 #HORIZONTAL TABULATION -0x0A 0x000A #LINE FEED -0x0B 0x000B #VERTICAL TABULATION -0x0C 0x000C #FORM FEED -0x0D 0x000D #CARRIAGE RETURN -0x0E 0x000E #SHIFT OUT -0x0F 0x000F #SHIFT IN -0x10 0x0010 #DATA LINK ESCAPE -0x11 0x0011 #DEVICE CONTROL ONE -0x12 0x0012 #DEVICE CONTROL TWO -0x13 0x0013 #DEVICE CONTROL THREE -0x14 0x0014 #DEVICE CONTROL FOUR -0x15 0x0015 #NEGATIVE ACKNOWLEDGE -0x16 0x0016 #SYNCHRONOUS IDLE -0x17 0x0017 #END OF TRANSMISSION BLOCK -0x18 0x0018 #CANCEL -0x19 0x0019 #END OF MEDIUM -0x1A 0x001A #SUBSTITUTE -0x1B 0x001B #ESCAPE -0x1C 0x001C #FILE SEPARATOR -0x1D 0x001D #GROUP SEPARATOR -0x1E 0x001E #RECORD SEPARATOR -0x1F 0x001F #UNIT SEPARATOR -0x20 0x0020 #SPACE -0x21 0x0021 #EXCLAMATION MARK -0x22 0x0022 #QUOTATION MARK -0x23 0x0023 #NUMBER SIGN -0x24 0x0024 #DOLLAR SIGN -0x25 0x0025 #PERCENT SIGN -0x26 0x0026 #AMPERSAND -0x27 0x0027 #APOSTROPHE -0x28 0x0028 #LEFT PARENTHESIS -0x29 0x0029 #RIGHT PARENTHESIS -0x2A 0x002A #ASTERISK -0x2B 0x002B #PLUS SIGN -0x2C 0x002C #COMMA -0x2D 0x002D #HYPHEN-MINUS -0x2E 0x002E #FULL STOP -0x2F 0x002F #SOLIDUS -0x30 0x0030 #DIGIT ZERO -0x31 0x0031 #DIGIT ONE -0x32 0x0032 #DIGIT TWO -0x33 0x0033 #DIGIT THREE -0x34 0x0034 #DIGIT FOUR -0x35 0x0035 #DIGIT FIVE -0x36 0x0036 #DIGIT SIX -0x37 0x0037 #DIGIT SEVEN -0x38 0x0038 #DIGIT EIGHT -0x39 0x0039 #DIGIT NINE -0x3A 0x003A #COLON -0x3B 0x003B #SEMICOLON -0x3C 0x003C #LESS-THAN SIGN -0x3D 0x003D #EQUALS SIGN -0x3E 0x003E #GREATER-THAN SIGN -0x3F 0x003F #QUESTION MARK -0x40 0x0040 #COMMERCIAL AT -0x41 0x0041 #LATIN CAPITAL LETTER A -0x42 0x0042 #LATIN CAPITAL LETTER B -0x43 0x0043 #LATIN CAPITAL LETTER C -0x44 0x0044 #LATIN CAPITAL LETTER D -0x45 0x0045 #LATIN CAPITAL LETTER E -0x46 0x0046 #LATIN CAPITAL LETTER F -0x47 0x0047 #LATIN CAPITAL LETTER G -0x48 0x0048 #LATIN CAPITAL LETTER H -0x49 0x0049 #LATIN CAPITAL LETTER I -0x4A 0x004A #LATIN CAPITAL LETTER J -0x4B 0x004B #LATIN CAPITAL LETTER K -0x4C 0x004C #LATIN CAPITAL LETTER L -0x4D 0x004D #LATIN CAPITAL LETTER M -0x4E 0x004E #LATIN CAPITAL LETTER N -0x4F 0x004F #LATIN CAPITAL LETTER O -0x50 0x0050 #LATIN CAPITAL LETTER P -0x51 0x0051 #LATIN CAPITAL LETTER Q -0x52 0x0052 #LATIN CAPITAL LETTER R -0x53 0x0053 #LATIN CAPITAL LETTER S -0x54 0x0054 #LATIN CAPITAL LETTER T -0x55 0x0055 #LATIN CAPITAL LETTER U -0x56 0x0056 #LATIN CAPITAL LETTER V -0x57 0x0057 #LATIN CAPITAL LETTER W -0x58 0x0058 #LATIN CAPITAL LETTER X -0x59 0x0059 #LATIN CAPITAL LETTER Y -0x5A 0x005A #LATIN CAPITAL LETTER Z -0x5B 0x005B #LEFT SQUARE BRACKET -0x5C 0x005C #REVERSE SOLIDUS -0x5D 0x005D #RIGHT SQUARE BRACKET -0x5E 0x005E #CIRCUMFLEX ACCENT -0x5F 0x005F #LOW LINE -0x60 0x0060 #GRAVE ACCENT -0x61 0x0061 #LATIN SMALL LETTER A -0x62 0x0062 #LATIN SMALL LETTER B -0x63 0x0063 #LATIN SMALL LETTER C -0x64 0x0064 #LATIN SMALL LETTER D -0x65 0x0065 #LATIN SMALL LETTER E -0x66 0x0066 #LATIN SMALL LETTER F -0x67 0x0067 #LATIN SMALL LETTER G -0x68 0x0068 #LATIN SMALL LETTER H -0x69 0x0069 #LATIN SMALL LETTER I -0x6A 0x006A #LATIN SMALL LETTER J -0x6B 0x006B #LATIN SMALL LETTER K -0x6C 0x006C #LATIN SMALL LETTER L -0x6D 0x006D #LATIN SMALL LETTER M -0x6E 0x006E #LATIN SMALL LETTER N -0x6F 0x006F #LATIN SMALL LETTER O -0x70 0x0070 #LATIN SMALL LETTER P -0x71 0x0071 #LATIN SMALL LETTER Q -0x72 0x0072 #LATIN SMALL LETTER R -0x73 0x0073 #LATIN SMALL LETTER S -0x74 0x0074 #LATIN SMALL LETTER T -0x75 0x0075 #LATIN SMALL LETTER U -0x76 0x0076 #LATIN SMALL LETTER V -0x77 0x0077 #LATIN SMALL LETTER W -0x78 0x0078 #LATIN SMALL LETTER X -0x79 0x0079 #LATIN SMALL LETTER Y -0x7A 0x007A #LATIN SMALL LETTER Z -0x7B 0x007B #LEFT CURLY BRACKET -0x7C 0x007C #VERTICAL LINE -0x7D 0x007D #RIGHT CURLY BRACKET -0x7E 0x007E #TILDE -0x7F 0x007F #DELETE -0x80 0x20AC #EURO SIGN -0x81 #UNDEFINED -0x82 0x201A #SINGLE LOW-9 QUOTATION MARK -0x83 0x0192 #LATIN SMALL LETTER F WITH HOOK -0x84 0x201E #DOUBLE LOW-9 QUOTATION MARK -0x85 0x2026 #HORIZONTAL ELLIPSIS -0x86 0x2020 #DAGGER -0x87 0x2021 #DOUBLE DAGGER -0x88 0x02C6 #MODIFIER LETTER CIRCUMFLEX ACCENT -0x89 0x2030 #PER MILLE SIGN -0x8A 0x0160 #LATIN CAPITAL LETTER S WITH CARON -0x8B 0x2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK -0x8C 0x0152 #LATIN CAPITAL LIGATURE OE -0x8D #UNDEFINED -0x8E 0x017D #LATIN CAPITAL LETTER Z WITH CARON -0x8F #UNDEFINED -0x90 #UNDEFINED -0x91 0x2018 #LEFT SINGLE QUOTATION MARK -0x92 0x2019 #RIGHT SINGLE QUOTATION MARK -0x93 0x201C #LEFT DOUBLE QUOTATION MARK -0x94 0x201D #RIGHT DOUBLE QUOTATION MARK -0x95 0x2022 #BULLET -0x96 0x2013 #EN DASH -0x97 0x2014 #EM DASH -0x98 0x02DC #SMALL TILDE -0x99 0x2122 #TRADE MARK SIGN -0x9A 0x0161 #LATIN SMALL LETTER S WITH CARON -0x9B 0x203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK -0x9C 0x0153 #LATIN SMALL LIGATURE OE -0x9D #UNDEFINED -0x9E 0x017E #LATIN SMALL LETTER Z WITH CARON -0x9F 0x0178 #LATIN CAPITAL LETTER Y WITH DIAERESIS -0xA0 0x00A0 #NO-BREAK SPACE -0xA1 0x00A1 #INVERTED EXCLAMATION MARK -0xA2 0x00A2 #CENT SIGN -0xA3 0x00A3 #POUND SIGN -0xA4 0x00A4 #CURRENCY SIGN -0xA5 0x00A5 #YEN SIGN -0xA6 0x00A6 #BROKEN BAR -0xA7 0x00A7 #SECTION SIGN -0xA8 0x00A8 #DIAERESIS -0xA9 0x00A9 #COPYRIGHT SIGN -0xAA 0x00AA #FEMININE ORDINAL INDICATOR -0xAB 0x00AB #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC #NOT SIGN -0xAD 0x00AD #SOFT HYPHEN -0xAE 0x00AE #REGISTERED SIGN -0xAF 0x00AF #MACRON -0xB0 0x00B0 #DEGREE SIGN -0xB1 0x00B1 #PLUS-MINUS SIGN -0xB2 0x00B2 #SUPERSCRIPT TWO -0xB3 0x00B3 #SUPERSCRIPT THREE -0xB4 0x00B4 #ACUTE ACCENT -0xB5 0x00B5 #MICRO SIGN -0xB6 0x00B6 #PILCROW SIGN -0xB7 0x00B7 #MIDDLE DOT -0xB8 0x00B8 #CEDILLA -0xB9 0x00B9 #SUPERSCRIPT ONE -0xBA 0x00BA #MASCULINE ORDINAL INDICATOR -0xBB 0x00BB #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x00BC #VULGAR FRACTION ONE QUARTER -0xBD 0x00BD #VULGAR FRACTION ONE HALF -0xBE 0x00BE #VULGAR FRACTION THREE QUARTERS -0xBF 0x00BF #INVERTED QUESTION MARK -0xC0 0x00C0 #LATIN CAPITAL LETTER A WITH GRAVE -0xC1 0x00C1 #LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 #LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC3 0x00C3 #LATIN CAPITAL LETTER A WITH TILDE -0xC4 0x00C4 #LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x00C5 #LATIN CAPITAL LETTER A WITH RING ABOVE -0xC6 0x00C6 #LATIN CAPITAL LETTER AE -0xC7 0x00C7 #LATIN CAPITAL LETTER C WITH CEDILLA -0xC8 0x00C8 #LATIN CAPITAL LETTER E WITH GRAVE -0xC9 0x00C9 #LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x00CA #LATIN CAPITAL LETTER E WITH CIRCUMFLEX -0xCB 0x00CB #LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x00CC #LATIN CAPITAL LETTER I WITH GRAVE -0xCD 0x00CD #LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE #LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x00CF #LATIN CAPITAL LETTER I WITH DIAERESIS -0xD0 0x00D0 #LATIN CAPITAL LETTER ETH -0xD1 0x00D1 #LATIN CAPITAL LETTER N WITH TILDE -0xD2 0x00D2 #LATIN CAPITAL LETTER O WITH GRAVE -0xD3 0x00D3 #LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x00D4 #LATIN CAPITAL LETTER O WITH CIRCUMFLEX -0xD5 0x00D5 #LATIN CAPITAL LETTER O WITH TILDE -0xD6 0x00D6 #LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x00D7 #MULTIPLICATION SIGN -0xD8 0x00D8 #LATIN CAPITAL LETTER O WITH STROKE -0xD9 0x00D9 #LATIN CAPITAL LETTER U WITH GRAVE -0xDA 0x00DA #LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x00DB #LATIN CAPITAL LETTER U WITH CIRCUMFLEX -0xDC 0x00DC #LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x00DD #LATIN CAPITAL LETTER Y WITH ACUTE -0xDE 0x00DE #LATIN CAPITAL LETTER THORN -0xDF 0x00DF #LATIN SMALL LETTER SHARP S -0xE0 0x00E0 #LATIN SMALL LETTER A WITH GRAVE -0xE1 0x00E1 #LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 #LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE3 0x00E3 #LATIN SMALL LETTER A WITH TILDE -0xE4 0x00E4 #LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x00E5 #LATIN SMALL LETTER A WITH RING ABOVE -0xE6 0x00E6 #LATIN SMALL LETTER AE -0xE7 0x00E7 #LATIN SMALL LETTER C WITH CEDILLA -0xE8 0x00E8 #LATIN SMALL LETTER E WITH GRAVE -0xE9 0x00E9 #LATIN SMALL LETTER E WITH ACUTE -0xEA 0x00EA #LATIN SMALL LETTER E WITH CIRCUMFLEX -0xEB 0x00EB #LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x00EC #LATIN SMALL LETTER I WITH GRAVE -0xED 0x00ED #LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE #LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x00EF #LATIN SMALL LETTER I WITH DIAERESIS -0xF0 0x00F0 #LATIN SMALL LETTER ETH -0xF1 0x00F1 #LATIN SMALL LETTER N WITH TILDE -0xF2 0x00F2 #LATIN SMALL LETTER O WITH GRAVE -0xF3 0x00F3 #LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 #LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x00F5 #LATIN SMALL LETTER O WITH TILDE -0xF6 0x00F6 #LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x00F7 #DIVISION SIGN -0xF8 0x00F8 #LATIN SMALL LETTER O WITH STROKE -0xF9 0x00F9 #LATIN SMALL LETTER U WITH GRAVE -0xFA 0x00FA #LATIN SMALL LETTER U WITH ACUTE -0xFB 0x00FB #LATIN SMALL LETTER U WITH CIRCUMFLEX -0xFC 0x00FC #LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x00FD #LATIN SMALL LETTER Y WITH ACUTE -0xFE 0x00FE #LATIN SMALL LETTER THORN -0xFF 0x00FF #LATIN SMALL LETTER Y WITH DIAERESIS diff --git a/program/lib/encoding/CP1253.map b/program/lib/encoding/CP1253.map deleted file mode 100644 index 2ba51a0..0000000 --- a/program/lib/encoding/CP1253.map +++ /dev/null @@ -1,274 +0,0 @@ -# -# Name: cp1253 to Unicode table -# Unicode version: 2.0 -# Table version: 2.01 -# Table format: Format A -# Date: 04/15/98 -# -# Contact: cpxlate@microsoft.com -# -# General notes: none -# -# Format: Three tab-separated columns -# Column #1 is the cp1253 code (in hex) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 is the Unicode name (follows a comment sign, '#') -# -# The entries are in cp1253 order -# -0x00 0x0000 #NULL -0x01 0x0001 #START OF HEADING -0x02 0x0002 #START OF TEXT -0x03 0x0003 #END OF TEXT -0x04 0x0004 #END OF TRANSMISSION -0x05 0x0005 #ENQUIRY -0x06 0x0006 #ACKNOWLEDGE -0x07 0x0007 #BELL -0x08 0x0008 #BACKSPACE -0x09 0x0009 #HORIZONTAL TABULATION -0x0A 0x000A #LINE FEED -0x0B 0x000B #VERTICAL TABULATION -0x0C 0x000C #FORM FEED -0x0D 0x000D #CARRIAGE RETURN -0x0E 0x000E #SHIFT OUT -0x0F 0x000F #SHIFT IN -0x10 0x0010 #DATA LINK ESCAPE -0x11 0x0011 #DEVICE CONTROL ONE -0x12 0x0012 #DEVICE CONTROL TWO -0x13 0x0013 #DEVICE CONTROL THREE -0x14 0x0014 #DEVICE CONTROL FOUR -0x15 0x0015 #NEGATIVE ACKNOWLEDGE -0x16 0x0016 #SYNCHRONOUS IDLE -0x17 0x0017 #END OF TRANSMISSION BLOCK -0x18 0x0018 #CANCEL -0x19 0x0019 #END OF MEDIUM -0x1A 0x001A #SUBSTITUTE -0x1B 0x001B #ESCAPE -0x1C 0x001C #FILE SEPARATOR -0x1D 0x001D #GROUP SEPARATOR -0x1E 0x001E #RECORD SEPARATOR -0x1F 0x001F #UNIT SEPARATOR -0x20 0x0020 #SPACE -0x21 0x0021 #EXCLAMATION MARK -0x22 0x0022 #QUOTATION MARK -0x23 0x0023 #NUMBER SIGN -0x24 0x0024 #DOLLAR SIGN -0x25 0x0025 #PERCENT SIGN -0x26 0x0026 #AMPERSAND -0x27 0x0027 #APOSTROPHE -0x28 0x0028 #LEFT PARENTHESIS -0x29 0x0029 #RIGHT PARENTHESIS -0x2A 0x002A #ASTERISK -0x2B 0x002B #PLUS SIGN -0x2C 0x002C #COMMA -0x2D 0x002D #HYPHEN-MINUS -0x2E 0x002E #FULL STOP -0x2F 0x002F #SOLIDUS -0x30 0x0030 #DIGIT ZERO -0x31 0x0031 #DIGIT ONE -0x32 0x0032 #DIGIT TWO -0x33 0x0033 #DIGIT THREE -0x34 0x0034 #DIGIT FOUR -0x35 0x0035 #DIGIT FIVE -0x36 0x0036 #DIGIT SIX -0x37 0x0037 #DIGIT SEVEN -0x38 0x0038 #DIGIT EIGHT -0x39 0x0039 #DIGIT NINE -0x3A 0x003A #COLON -0x3B 0x003B #SEMICOLON -0x3C 0x003C #LESS-THAN SIGN -0x3D 0x003D #EQUALS SIGN -0x3E 0x003E #GREATER-THAN SIGN -0x3F 0x003F #QUESTION MARK -0x40 0x0040 #COMMERCIAL AT -0x41 0x0041 #LATIN CAPITAL LETTER A -0x42 0x0042 #LATIN CAPITAL LETTER B -0x43 0x0043 #LATIN CAPITAL LETTER C -0x44 0x0044 #LATIN CAPITAL LETTER D -0x45 0x0045 #LATIN CAPITAL LETTER E -0x46 0x0046 #LATIN CAPITAL LETTER F -0x47 0x0047 #LATIN CAPITAL LETTER G -0x48 0x0048 #LATIN CAPITAL LETTER H -0x49 0x0049 #LATIN CAPITAL LETTER I -0x4A 0x004A #LATIN CAPITAL LETTER J -0x4B 0x004B #LATIN CAPITAL LETTER K -0x4C 0x004C #LATIN CAPITAL LETTER L -0x4D 0x004D #LATIN CAPITAL LETTER M -0x4E 0x004E #LATIN CAPITAL LETTER N -0x4F 0x004F #LATIN CAPITAL LETTER O -0x50 0x0050 #LATIN CAPITAL LETTER P -0x51 0x0051 #LATIN CAPITAL LETTER Q -0x52 0x0052 #LATIN CAPITAL LETTER R -0x53 0x0053 #LATIN CAPITAL LETTER S -0x54 0x0054 #LATIN CAPITAL LETTER T -0x55 0x0055 #LATIN CAPITAL LETTER U -0x56 0x0056 #LATIN CAPITAL LETTER V -0x57 0x0057 #LATIN CAPITAL LETTER W -0x58 0x0058 #LATIN CAPITAL LETTER X -0x59 0x0059 #LATIN CAPITAL LETTER Y -0x5A 0x005A #LATIN CAPITAL LETTER Z -0x5B 0x005B #LEFT SQUARE BRACKET -0x5C 0x005C #REVERSE SOLIDUS -0x5D 0x005D #RIGHT SQUARE BRACKET -0x5E 0x005E #CIRCUMFLEX ACCENT -0x5F 0x005F #LOW LINE -0x60 0x0060 #GRAVE ACCENT -0x61 0x0061 #LATIN SMALL LETTER A -0x62 0x0062 #LATIN SMALL LETTER B -0x63 0x0063 #LATIN SMALL LETTER C -0x64 0x0064 #LATIN SMALL LETTER D -0x65 0x0065 #LATIN SMALL LETTER E -0x66 0x0066 #LATIN SMALL LETTER F -0x67 0x0067 #LATIN SMALL LETTER G -0x68 0x0068 #LATIN SMALL LETTER H -0x69 0x0069 #LATIN SMALL LETTER I -0x6A 0x006A #LATIN SMALL LETTER J -0x6B 0x006B #LATIN SMALL LETTER K -0x6C 0x006C #LATIN SMALL LETTER L -0x6D 0x006D #LATIN SMALL LETTER M -0x6E 0x006E #LATIN SMALL LETTER N -0x6F 0x006F #LATIN SMALL LETTER O -0x70 0x0070 #LATIN SMALL LETTER P -0x71 0x0071 #LATIN SMALL LETTER Q -0x72 0x0072 #LATIN SMALL LETTER R -0x73 0x0073 #LATIN SMALL LETTER S -0x74 0x0074 #LATIN SMALL LETTER T -0x75 0x0075 #LATIN SMALL LETTER U -0x76 0x0076 #LATIN SMALL LETTER V -0x77 0x0077 #LATIN SMALL LETTER W -0x78 0x0078 #LATIN SMALL LETTER X -0x79 0x0079 #LATIN SMALL LETTER Y -0x7A 0x007A #LATIN SMALL LETTER Z -0x7B 0x007B #LEFT CURLY BRACKET -0x7C 0x007C #VERTICAL LINE -0x7D 0x007D #RIGHT CURLY BRACKET -0x7E 0x007E #TILDE -0x7F 0x007F #DELETE -0x80 0x20AC #EURO SIGN -0x81 #UNDEFINED -0x82 0x201A #SINGLE LOW-9 QUOTATION MARK -0x83 0x0192 #LATIN SMALL LETTER F WITH HOOK -0x84 0x201E #DOUBLE LOW-9 QUOTATION MARK -0x85 0x2026 #HORIZONTAL ELLIPSIS -0x86 0x2020 #DAGGER -0x87 0x2021 #DOUBLE DAGGER -0x88 #UNDEFINED -0x89 0x2030 #PER MILLE SIGN -0x8A #UNDEFINED -0x8B 0x2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK -0x8C #UNDEFINED -0x8D #UNDEFINED -0x8E #UNDEFINED -0x8F #UNDEFINED -0x90 #UNDEFINED -0x91 0x2018 #LEFT SINGLE QUOTATION MARK -0x92 0x2019 #RIGHT SINGLE QUOTATION MARK -0x93 0x201C #LEFT DOUBLE QUOTATION MARK -0x94 0x201D #RIGHT DOUBLE QUOTATION MARK -0x95 0x2022 #BULLET -0x96 0x2013 #EN DASH -0x97 0x2014 #EM DASH -0x98 #UNDEFINED -0x99 0x2122 #TRADE MARK SIGN -0x9A #UNDEFINED -0x9B 0x203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK -0x9C #UNDEFINED -0x9D #UNDEFINED -0x9E #UNDEFINED -0x9F #UNDEFINED -0xA0 0x00A0 #NO-BREAK SPACE -0xA1 0x0385 #GREEK DIALYTIKA TONOS -0xA2 0x0386 #GREEK CAPITAL LETTER ALPHA WITH TONOS -0xA3 0x00A3 #POUND SIGN -0xA4 0x00A4 #CURRENCY SIGN -0xA5 0x00A5 #YEN SIGN -0xA6 0x00A6 #BROKEN BAR -0xA7 0x00A7 #SECTION SIGN -0xA8 0x00A8 #DIAERESIS -0xA9 0x00A9 #COPYRIGHT SIGN -0xAA #UNDEFINED -0xAB 0x00AB #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC #NOT SIGN -0xAD 0x00AD #SOFT HYPHEN -0xAE 0x00AE #REGISTERED SIGN -0xAF 0x2015 #HORIZONTAL BAR -0xB0 0x00B0 #DEGREE SIGN -0xB1 0x00B1 #PLUS-MINUS SIGN -0xB2 0x00B2 #SUPERSCRIPT TWO -0xB3 0x00B3 #SUPERSCRIPT THREE -0xB4 0x0384 #GREEK TONOS -0xB5 0x00B5 #MICRO SIGN -0xB6 0x00B6 #PILCROW SIGN -0xB7 0x00B7 #MIDDLE DOT -0xB8 0x0388 #GREEK CAPITAL LETTER EPSILON WITH TONOS -0xB9 0x0389 #GREEK CAPITAL LETTER ETA WITH TONOS -0xBA 0x038A #GREEK CAPITAL LETTER IOTA WITH TONOS -0xBB 0x00BB #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x038C #GREEK CAPITAL LETTER OMICRON WITH TONOS -0xBD 0x00BD #VULGAR FRACTION ONE HALF -0xBE 0x038E #GREEK CAPITAL LETTER UPSILON WITH TONOS -0xBF 0x038F #GREEK CAPITAL LETTER OMEGA WITH TONOS -0xC0 0x0390 #GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS -0xC1 0x0391 #GREEK CAPITAL LETTER ALPHA -0xC2 0x0392 #GREEK CAPITAL LETTER BETA -0xC3 0x0393 #GREEK CAPITAL LETTER GAMMA -0xC4 0x0394 #GREEK CAPITAL LETTER DELTA -0xC5 0x0395 #GREEK CAPITAL LETTER EPSILON -0xC6 0x0396 #GREEK CAPITAL LETTER ZETA -0xC7 0x0397 #GREEK CAPITAL LETTER ETA -0xC8 0x0398 #GREEK CAPITAL LETTER THETA -0xC9 0x0399 #GREEK CAPITAL LETTER IOTA -0xCA 0x039A #GREEK CAPITAL LETTER KAPPA -0xCB 0x039B #GREEK CAPITAL LETTER LAMDA -0xCC 0x039C #GREEK CAPITAL LETTER MU -0xCD 0x039D #GREEK CAPITAL LETTER NU -0xCE 0x039E #GREEK CAPITAL LETTER XI -0xCF 0x039F #GREEK CAPITAL LETTER OMICRON -0xD0 0x03A0 #GREEK CAPITAL LETTER PI -0xD1 0x03A1 #GREEK CAPITAL LETTER RHO -0xD2 #UNDEFINED -0xD3 0x03A3 #GREEK CAPITAL LETTER SIGMA -0xD4 0x03A4 #GREEK CAPITAL LETTER TAU -0xD5 0x03A5 #GREEK CAPITAL LETTER UPSILON -0xD6 0x03A6 #GREEK CAPITAL LETTER PHI -0xD7 0x03A7 #GREEK CAPITAL LETTER CHI -0xD8 0x03A8 #GREEK CAPITAL LETTER PSI -0xD9 0x03A9 #GREEK CAPITAL LETTER OMEGA -0xDA 0x03AA #GREEK CAPITAL LETTER IOTA WITH DIALYTIKA -0xDB 0x03AB #GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA -0xDC 0x03AC #GREEK SMALL LETTER ALPHA WITH TONOS -0xDD 0x03AD #GREEK SMALL LETTER EPSILON WITH TONOS -0xDE 0x03AE #GREEK SMALL LETTER ETA WITH TONOS -0xDF 0x03AF #GREEK SMALL LETTER IOTA WITH TONOS -0xE0 0x03B0 #GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS -0xE1 0x03B1 #GREEK SMALL LETTER ALPHA -0xE2 0x03B2 #GREEK SMALL LETTER BETA -0xE3 0x03B3 #GREEK SMALL LETTER GAMMA -0xE4 0x03B4 #GREEK SMALL LETTER DELTA -0xE5 0x03B5 #GREEK SMALL LETTER EPSILON -0xE6 0x03B6 #GREEK SMALL LETTER ZETA -0xE7 0x03B7 #GREEK SMALL LETTER ETA -0xE8 0x03B8 #GREEK SMALL LETTER THETA -0xE9 0x03B9 #GREEK SMALL LETTER IOTA -0xEA 0x03BA #GREEK SMALL LETTER KAPPA -0xEB 0x03BB #GREEK SMALL LETTER LAMDA -0xEC 0x03BC #GREEK SMALL LETTER MU -0xED 0x03BD #GREEK SMALL LETTER NU -0xEE 0x03BE #GREEK SMALL LETTER XI -0xEF 0x03BF #GREEK SMALL LETTER OMICRON -0xF0 0x03C0 #GREEK SMALL LETTER PI -0xF1 0x03C1 #GREEK SMALL LETTER RHO -0xF2 0x03C2 #GREEK SMALL LETTER FINAL SIGMA -0xF3 0x03C3 #GREEK SMALL LETTER SIGMA -0xF4 0x03C4 #GREEK SMALL LETTER TAU -0xF5 0x03C5 #GREEK SMALL LETTER UPSILON -0xF6 0x03C6 #GREEK SMALL LETTER PHI -0xF7 0x03C7 #GREEK SMALL LETTER CHI -0xF8 0x03C8 #GREEK SMALL LETTER PSI -0xF9 0x03C9 #GREEK SMALL LETTER OMEGA -0xFA 0x03CA #GREEK SMALL LETTER IOTA WITH DIALYTIKA -0xFB 0x03CB #GREEK SMALL LETTER UPSILON WITH DIALYTIKA -0xFC 0x03CC #GREEK SMALL LETTER OMICRON WITH TONOS -0xFD 0x03CD #GREEK SMALL LETTER UPSILON WITH TONOS -0xFE 0x03CE #GREEK SMALL LETTER OMEGA WITH TONOS -0xFF #UNDEFINED diff --git a/program/lib/encoding/CP1254.map b/program/lib/encoding/CP1254.map deleted file mode 100644 index ca1a1eb..0000000 --- a/program/lib/encoding/CP1254.map +++ /dev/null @@ -1,274 +0,0 @@ -# -# Name: cp1254 to Unicode table -# Unicode version: 2.0 -# Table version: 2.01 -# Table format: Format A -# Date: 04/15/98 -# -# Contact: cpxlate@microsoft.com -# -# General notes: none -# -# Format: Three tab-separated columns -# Column #1 is the cp1254 code (in hex) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 is the Unicode name (follows a comment sign, '#') -# -# The entries are in cp1254 order -# -0x00 0x0000 #NULL -0x01 0x0001 #START OF HEADING -0x02 0x0002 #START OF TEXT -0x03 0x0003 #END OF TEXT -0x04 0x0004 #END OF TRANSMISSION -0x05 0x0005 #ENQUIRY -0x06 0x0006 #ACKNOWLEDGE -0x07 0x0007 #BELL -0x08 0x0008 #BACKSPACE -0x09 0x0009 #HORIZONTAL TABULATION -0x0A 0x000A #LINE FEED -0x0B 0x000B #VERTICAL TABULATION -0x0C 0x000C #FORM FEED -0x0D 0x000D #CARRIAGE RETURN -0x0E 0x000E #SHIFT OUT -0x0F 0x000F #SHIFT IN -0x10 0x0010 #DATA LINK ESCAPE -0x11 0x0011 #DEVICE CONTROL ONE -0x12 0x0012 #DEVICE CONTROL TWO -0x13 0x0013 #DEVICE CONTROL THREE -0x14 0x0014 #DEVICE CONTROL FOUR -0x15 0x0015 #NEGATIVE ACKNOWLEDGE -0x16 0x0016 #SYNCHRONOUS IDLE -0x17 0x0017 #END OF TRANSMISSION BLOCK -0x18 0x0018 #CANCEL -0x19 0x0019 #END OF MEDIUM -0x1A 0x001A #SUBSTITUTE -0x1B 0x001B #ESCAPE -0x1C 0x001C #FILE SEPARATOR -0x1D 0x001D #GROUP SEPARATOR -0x1E 0x001E #RECORD SEPARATOR -0x1F 0x001F #UNIT SEPARATOR -0x20 0x0020 #SPACE -0x21 0x0021 #EXCLAMATION MARK -0x22 0x0022 #QUOTATION MARK -0x23 0x0023 #NUMBER SIGN -0x24 0x0024 #DOLLAR SIGN -0x25 0x0025 #PERCENT SIGN -0x26 0x0026 #AMPERSAND -0x27 0x0027 #APOSTROPHE -0x28 0x0028 #LEFT PARENTHESIS -0x29 0x0029 #RIGHT PARENTHESIS -0x2A 0x002A #ASTERISK -0x2B 0x002B #PLUS SIGN -0x2C 0x002C #COMMA -0x2D 0x002D #HYPHEN-MINUS -0x2E 0x002E #FULL STOP -0x2F 0x002F #SOLIDUS -0x30 0x0030 #DIGIT ZERO -0x31 0x0031 #DIGIT ONE -0x32 0x0032 #DIGIT TWO -0x33 0x0033 #DIGIT THREE -0x34 0x0034 #DIGIT FOUR -0x35 0x0035 #DIGIT FIVE -0x36 0x0036 #DIGIT SIX -0x37 0x0037 #DIGIT SEVEN -0x38 0x0038 #DIGIT EIGHT -0x39 0x0039 #DIGIT NINE -0x3A 0x003A #COLON -0x3B 0x003B #SEMICOLON -0x3C 0x003C #LESS-THAN SIGN -0x3D 0x003D #EQUALS SIGN -0x3E 0x003E #GREATER-THAN SIGN -0x3F 0x003F #QUESTION MARK -0x40 0x0040 #COMMERCIAL AT -0x41 0x0041 #LATIN CAPITAL LETTER A -0x42 0x0042 #LATIN CAPITAL LETTER B -0x43 0x0043 #LATIN CAPITAL LETTER C -0x44 0x0044 #LATIN CAPITAL LETTER D -0x45 0x0045 #LATIN CAPITAL LETTER E -0x46 0x0046 #LATIN CAPITAL LETTER F -0x47 0x0047 #LATIN CAPITAL LETTER G -0x48 0x0048 #LATIN CAPITAL LETTER H -0x49 0x0049 #LATIN CAPITAL LETTER I -0x4A 0x004A #LATIN CAPITAL LETTER J -0x4B 0x004B #LATIN CAPITAL LETTER K -0x4C 0x004C #LATIN CAPITAL LETTER L -0x4D 0x004D #LATIN CAPITAL LETTER M -0x4E 0x004E #LATIN CAPITAL LETTER N -0x4F 0x004F #LATIN CAPITAL LETTER O -0x50 0x0050 #LATIN CAPITAL LETTER P -0x51 0x0051 #LATIN CAPITAL LETTER Q -0x52 0x0052 #LATIN CAPITAL LETTER R -0x53 0x0053 #LATIN CAPITAL LETTER S -0x54 0x0054 #LATIN CAPITAL LETTER T -0x55 0x0055 #LATIN CAPITAL LETTER U -0x56 0x0056 #LATIN CAPITAL LETTER V -0x57 0x0057 #LATIN CAPITAL LETTER W -0x58 0x0058 #LATIN CAPITAL LETTER X -0x59 0x0059 #LATIN CAPITAL LETTER Y -0x5A 0x005A #LATIN CAPITAL LETTER Z -0x5B 0x005B #LEFT SQUARE BRACKET -0x5C 0x005C #REVERSE SOLIDUS -0x5D 0x005D #RIGHT SQUARE BRACKET -0x5E 0x005E #CIRCUMFLEX ACCENT -0x5F 0x005F #LOW LINE -0x60 0x0060 #GRAVE ACCENT -0x61 0x0061 #LATIN SMALL LETTER A -0x62 0x0062 #LATIN SMALL LETTER B -0x63 0x0063 #LATIN SMALL LETTER C -0x64 0x0064 #LATIN SMALL LETTER D -0x65 0x0065 #LATIN SMALL LETTER E -0x66 0x0066 #LATIN SMALL LETTER F -0x67 0x0067 #LATIN SMALL LETTER G -0x68 0x0068 #LATIN SMALL LETTER H -0x69 0x0069 #LATIN SMALL LETTER I -0x6A 0x006A #LATIN SMALL LETTER J -0x6B 0x006B #LATIN SMALL LETTER K -0x6C 0x006C #LATIN SMALL LETTER L -0x6D 0x006D #LATIN SMALL LETTER M -0x6E 0x006E #LATIN SMALL LETTER N -0x6F 0x006F #LATIN SMALL LETTER O -0x70 0x0070 #LATIN SMALL LETTER P -0x71 0x0071 #LATIN SMALL LETTER Q -0x72 0x0072 #LATIN SMALL LETTER R -0x73 0x0073 #LATIN SMALL LETTER S -0x74 0x0074 #LATIN SMALL LETTER T -0x75 0x0075 #LATIN SMALL LETTER U -0x76 0x0076 #LATIN SMALL LETTER V -0x77 0x0077 #LATIN SMALL LETTER W -0x78 0x0078 #LATIN SMALL LETTER X -0x79 0x0079 #LATIN SMALL LETTER Y -0x7A 0x007A #LATIN SMALL LETTER Z -0x7B 0x007B #LEFT CURLY BRACKET -0x7C 0x007C #VERTICAL LINE -0x7D 0x007D #RIGHT CURLY BRACKET -0x7E 0x007E #TILDE -0x7F 0x007F #DELETE -0x80 0x20AC #EURO SIGN -0x81 #UNDEFINED -0x82 0x201A #SINGLE LOW-9 QUOTATION MARK -0x83 0x0192 #LATIN SMALL LETTER F WITH HOOK -0x84 0x201E #DOUBLE LOW-9 QUOTATION MARK -0x85 0x2026 #HORIZONTAL ELLIPSIS -0x86 0x2020 #DAGGER -0x87 0x2021 #DOUBLE DAGGER -0x88 0x02C6 #MODIFIER LETTER CIRCUMFLEX ACCENT -0x89 0x2030 #PER MILLE SIGN -0x8A 0x0160 #LATIN CAPITAL LETTER S WITH CARON -0x8B 0x2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK -0x8C 0x0152 #LATIN CAPITAL LIGATURE OE -0x8D #UNDEFINED -0x8E #UNDEFINED -0x8F #UNDEFINED -0x90 #UNDEFINED -0x91 0x2018 #LEFT SINGLE QUOTATION MARK -0x92 0x2019 #RIGHT SINGLE QUOTATION MARK -0x93 0x201C #LEFT DOUBLE QUOTATION MARK -0x94 0x201D #RIGHT DOUBLE QUOTATION MARK -0x95 0x2022 #BULLET -0x96 0x2013 #EN DASH -0x97 0x2014 #EM DASH -0x98 0x02DC #SMALL TILDE -0x99 0x2122 #TRADE MARK SIGN -0x9A 0x0161 #LATIN SMALL LETTER S WITH CARON -0x9B 0x203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK -0x9C 0x0153 #LATIN SMALL LIGATURE OE -0x9D #UNDEFINED -0x9E #UNDEFINED -0x9F 0x0178 #LATIN CAPITAL LETTER Y WITH DIAERESIS -0xA0 0x00A0 #NO-BREAK SPACE -0xA1 0x00A1 #INVERTED EXCLAMATION MARK -0xA2 0x00A2 #CENT SIGN -0xA3 0x00A3 #POUND SIGN -0xA4 0x00A4 #CURRENCY SIGN -0xA5 0x00A5 #YEN SIGN -0xA6 0x00A6 #BROKEN BAR -0xA7 0x00A7 #SECTION SIGN -0xA8 0x00A8 #DIAERESIS -0xA9 0x00A9 #COPYRIGHT SIGN -0xAA 0x00AA #FEMININE ORDINAL INDICATOR -0xAB 0x00AB #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC #NOT SIGN -0xAD 0x00AD #SOFT HYPHEN -0xAE 0x00AE #REGISTERED SIGN -0xAF 0x00AF #MACRON -0xB0 0x00B0 #DEGREE SIGN -0xB1 0x00B1 #PLUS-MINUS SIGN -0xB2 0x00B2 #SUPERSCRIPT TWO -0xB3 0x00B3 #SUPERSCRIPT THREE -0xB4 0x00B4 #ACUTE ACCENT -0xB5 0x00B5 #MICRO SIGN -0xB6 0x00B6 #PILCROW SIGN -0xB7 0x00B7 #MIDDLE DOT -0xB8 0x00B8 #CEDILLA -0xB9 0x00B9 #SUPERSCRIPT ONE -0xBA 0x00BA #MASCULINE ORDINAL INDICATOR -0xBB 0x00BB #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x00BC #VULGAR FRACTION ONE QUARTER -0xBD 0x00BD #VULGAR FRACTION ONE HALF -0xBE 0x00BE #VULGAR FRACTION THREE QUARTERS -0xBF 0x00BF #INVERTED QUESTION MARK -0xC0 0x00C0 #LATIN CAPITAL LETTER A WITH GRAVE -0xC1 0x00C1 #LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 #LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC3 0x00C3 #LATIN CAPITAL LETTER A WITH TILDE -0xC4 0x00C4 #LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x00C5 #LATIN CAPITAL LETTER A WITH RING ABOVE -0xC6 0x00C6 #LATIN CAPITAL LETTER AE -0xC7 0x00C7 #LATIN CAPITAL LETTER C WITH CEDILLA -0xC8 0x00C8 #LATIN CAPITAL LETTER E WITH GRAVE -0xC9 0x00C9 #LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x00CA #LATIN CAPITAL LETTER E WITH CIRCUMFLEX -0xCB 0x00CB #LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x00CC #LATIN CAPITAL LETTER I WITH GRAVE -0xCD 0x00CD #LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE #LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x00CF #LATIN CAPITAL LETTER I WITH DIAERESIS -0xD0 0x011E #LATIN CAPITAL LETTER G WITH BREVE -0xD1 0x00D1 #LATIN CAPITAL LETTER N WITH TILDE -0xD2 0x00D2 #LATIN CAPITAL LETTER O WITH GRAVE -0xD3 0x00D3 #LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x00D4 #LATIN CAPITAL LETTER O WITH CIRCUMFLEX -0xD5 0x00D5 #LATIN CAPITAL LETTER O WITH TILDE -0xD6 0x00D6 #LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x00D7 #MULTIPLICATION SIGN -0xD8 0x00D8 #LATIN CAPITAL LETTER O WITH STROKE -0xD9 0x00D9 #LATIN CAPITAL LETTER U WITH GRAVE -0xDA 0x00DA #LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x00DB #LATIN CAPITAL LETTER U WITH CIRCUMFLEX -0xDC 0x00DC #LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x0130 #LATIN CAPITAL LETTER I WITH DOT ABOVE -0xDE 0x015E #LATIN CAPITAL LETTER S WITH CEDILLA -0xDF 0x00DF #LATIN SMALL LETTER SHARP S -0xE0 0x00E0 #LATIN SMALL LETTER A WITH GRAVE -0xE1 0x00E1 #LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 #LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE3 0x00E3 #LATIN SMALL LETTER A WITH TILDE -0xE4 0x00E4 #LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x00E5 #LATIN SMALL LETTER A WITH RING ABOVE -0xE6 0x00E6 #LATIN SMALL LETTER AE -0xE7 0x00E7 #LATIN SMALL LETTER C WITH CEDILLA -0xE8 0x00E8 #LATIN SMALL LETTER E WITH GRAVE -0xE9 0x00E9 #LATIN SMALL LETTER E WITH ACUTE -0xEA 0x00EA #LATIN SMALL LETTER E WITH CIRCUMFLEX -0xEB 0x00EB #LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x00EC #LATIN SMALL LETTER I WITH GRAVE -0xED 0x00ED #LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE #LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x00EF #LATIN SMALL LETTER I WITH DIAERESIS -0xF0 0x011F #LATIN SMALL LETTER G WITH BREVE -0xF1 0x00F1 #LATIN SMALL LETTER N WITH TILDE -0xF2 0x00F2 #LATIN SMALL LETTER O WITH GRAVE -0xF3 0x00F3 #LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 #LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x00F5 #LATIN SMALL LETTER O WITH TILDE -0xF6 0x00F6 #LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x00F7 #DIVISION SIGN -0xF8 0x00F8 #LATIN SMALL LETTER O WITH STROKE -0xF9 0x00F9 #LATIN SMALL LETTER U WITH GRAVE -0xFA 0x00FA #LATIN SMALL LETTER U WITH ACUTE -0xFB 0x00FB #LATIN SMALL LETTER U WITH CIRCUMFLEX -0xFC 0x00FC #LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x0131 #LATIN SMALL LETTER DOTLESS I -0xFE 0x015F #LATIN SMALL LETTER S WITH CEDILLA -0xFF 0x00FF #LATIN SMALL LETTER Y WITH DIAERESIS diff --git a/program/lib/encoding/CP1255.map b/program/lib/encoding/CP1255.map deleted file mode 100644 index 341517f..0000000 --- a/program/lib/encoding/CP1255.map +++ /dev/null @@ -1,274 +0,0 @@ -# -# Name: cp1255 to Unicode table -# Unicode version: 2.0 -# Table version: 2.01 -# Table format: Format A -# Date: 1/7/2000 -# -# Contact: cpxlate@microsoft.com -# -# General notes: none -# -# Format: Three tab-separated columns -# Column #1 is the cp1255 code (in hex) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 is the Unicode name (follows a comment sign, '#') -# -# The entries are in cp1255 order -# -0x00 0x0000 #NULL -0x01 0x0001 #START OF HEADING -0x02 0x0002 #START OF TEXT -0x03 0x0003 #END OF TEXT -0x04 0x0004 #END OF TRANSMISSION -0x05 0x0005 #ENQUIRY -0x06 0x0006 #ACKNOWLEDGE -0x07 0x0007 #BELL -0x08 0x0008 #BACKSPACE -0x09 0x0009 #HORIZONTAL TABULATION -0x0A 0x000A #LINE FEED -0x0B 0x000B #VERTICAL TABULATION -0x0C 0x000C #FORM FEED -0x0D 0x000D #CARRIAGE RETURN -0x0E 0x000E #SHIFT OUT -0x0F 0x000F #SHIFT IN -0x10 0x0010 #DATA LINK ESCAPE -0x11 0x0011 #DEVICE CONTROL ONE -0x12 0x0012 #DEVICE CONTROL TWO -0x13 0x0013 #DEVICE CONTROL THREE -0x14 0x0014 #DEVICE CONTROL FOUR -0x15 0x0015 #NEGATIVE ACKNOWLEDGE -0x16 0x0016 #SYNCHRONOUS IDLE -0x17 0x0017 #END OF TRANSMISSION BLOCK -0x18 0x0018 #CANCEL -0x19 0x0019 #END OF MEDIUM -0x1A 0x001A #SUBSTITUTE -0x1B 0x001B #ESCAPE -0x1C 0x001C #FILE SEPARATOR -0x1D 0x001D #GROUP SEPARATOR -0x1E 0x001E #RECORD SEPARATOR -0x1F 0x001F #UNIT SEPARATOR -0x20 0x0020 #SPACE -0x21 0x0021 #EXCLAMATION MARK -0x22 0x0022 #QUOTATION MARK -0x23 0x0023 #NUMBER SIGN -0x24 0x0024 #DOLLAR SIGN -0x25 0x0025 #PERCENT SIGN -0x26 0x0026 #AMPERSAND -0x27 0x0027 #APOSTROPHE -0x28 0x0028 #LEFT PARENTHESIS -0x29 0x0029 #RIGHT PARENTHESIS -0x2A 0x002A #ASTERISK -0x2B 0x002B #PLUS SIGN -0x2C 0x002C #COMMA -0x2D 0x002D #HYPHEN-MINUS -0x2E 0x002E #FULL STOP -0x2F 0x002F #SOLIDUS -0x30 0x0030 #DIGIT ZERO -0x31 0x0031 #DIGIT ONE -0x32 0x0032 #DIGIT TWO -0x33 0x0033 #DIGIT THREE -0x34 0x0034 #DIGIT FOUR -0x35 0x0035 #DIGIT FIVE -0x36 0x0036 #DIGIT SIX -0x37 0x0037 #DIGIT SEVEN -0x38 0x0038 #DIGIT EIGHT -0x39 0x0039 #DIGIT NINE -0x3A 0x003A #COLON -0x3B 0x003B #SEMICOLON -0x3C 0x003C #LESS-THAN SIGN -0x3D 0x003D #EQUALS SIGN -0x3E 0x003E #GREATER-THAN SIGN -0x3F 0x003F #QUESTION MARK -0x40 0x0040 #COMMERCIAL AT -0x41 0x0041 #LATIN CAPITAL LETTER A -0x42 0x0042 #LATIN CAPITAL LETTER B -0x43 0x0043 #LATIN CAPITAL LETTER C -0x44 0x0044 #LATIN CAPITAL LETTER D -0x45 0x0045 #LATIN CAPITAL LETTER E -0x46 0x0046 #LATIN CAPITAL LETTER F -0x47 0x0047 #LATIN CAPITAL LETTER G -0x48 0x0048 #LATIN CAPITAL LETTER H -0x49 0x0049 #LATIN CAPITAL LETTER I -0x4A 0x004A #LATIN CAPITAL LETTER J -0x4B 0x004B #LATIN CAPITAL LETTER K -0x4C 0x004C #LATIN CAPITAL LETTER L -0x4D 0x004D #LATIN CAPITAL LETTER M -0x4E 0x004E #LATIN CAPITAL LETTER N -0x4F 0x004F #LATIN CAPITAL LETTER O -0x50 0x0050 #LATIN CAPITAL LETTER P -0x51 0x0051 #LATIN CAPITAL LETTER Q -0x52 0x0052 #LATIN CAPITAL LETTER R -0x53 0x0053 #LATIN CAPITAL LETTER S -0x54 0x0054 #LATIN CAPITAL LETTER T -0x55 0x0055 #LATIN CAPITAL LETTER U -0x56 0x0056 #LATIN CAPITAL LETTER V -0x57 0x0057 #LATIN CAPITAL LETTER W -0x58 0x0058 #LATIN CAPITAL LETTER X -0x59 0x0059 #LATIN CAPITAL LETTER Y -0x5A 0x005A #LATIN CAPITAL LETTER Z -0x5B 0x005B #LEFT SQUARE BRACKET -0x5C 0x005C #REVERSE SOLIDUS -0x5D 0x005D #RIGHT SQUARE BRACKET -0x5E 0x005E #CIRCUMFLEX ACCENT -0x5F 0x005F #LOW LINE -0x60 0x0060 #GRAVE ACCENT -0x61 0x0061 #LATIN SMALL LETTER A -0x62 0x0062 #LATIN SMALL LETTER B -0x63 0x0063 #LATIN SMALL LETTER C -0x64 0x0064 #LATIN SMALL LETTER D -0x65 0x0065 #LATIN SMALL LETTER E -0x66 0x0066 #LATIN SMALL LETTER F -0x67 0x0067 #LATIN SMALL LETTER G -0x68 0x0068 #LATIN SMALL LETTER H -0x69 0x0069 #LATIN SMALL LETTER I -0x6A 0x006A #LATIN SMALL LETTER J -0x6B 0x006B #LATIN SMALL LETTER K -0x6C 0x006C #LATIN SMALL LETTER L -0x6D 0x006D #LATIN SMALL LETTER M -0x6E 0x006E #LATIN SMALL LETTER N -0x6F 0x006F #LATIN SMALL LETTER O -0x70 0x0070 #LATIN SMALL LETTER P -0x71 0x0071 #LATIN SMALL LETTER Q -0x72 0x0072 #LATIN SMALL LETTER R -0x73 0x0073 #LATIN SMALL LETTER S -0x74 0x0074 #LATIN SMALL LETTER T -0x75 0x0075 #LATIN SMALL LETTER U -0x76 0x0076 #LATIN SMALL LETTER V -0x77 0x0077 #LATIN SMALL LETTER W -0x78 0x0078 #LATIN SMALL LETTER X -0x79 0x0079 #LATIN SMALL LETTER Y -0x7A 0x007A #LATIN SMALL LETTER Z -0x7B 0x007B #LEFT CURLY BRACKET -0x7C 0x007C #VERTICAL LINE -0x7D 0x007D #RIGHT CURLY BRACKET -0x7E 0x007E #TILDE -0x7F 0x007F #DELETE -0x80 0x20AC #EURO SIGN -0x81 #UNDEFINED -0x82 0x201A #SINGLE LOW-9 QUOTATION MARK -0x83 0x0192 #LATIN SMALL LETTER F WITH HOOK -0x84 0x201E #DOUBLE LOW-9 QUOTATION MARK -0x85 0x2026 #HORIZONTAL ELLIPSIS -0x86 0x2020 #DAGGER -0x87 0x2021 #DOUBLE DAGGER -0x88 0x02C6 #MODIFIER LETTER CIRCUMFLEX ACCENT -0x89 0x2030 #PER MILLE SIGN -0x8A #UNDEFINED -0x8B 0x2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK -0x8C #UNDEFINED -0x8D #UNDEFINED -0x8E #UNDEFINED -0x8F #UNDEFINED -0x90 #UNDEFINED -0x91 0x2018 #LEFT SINGLE QUOTATION MARK -0x92 0x2019 #RIGHT SINGLE QUOTATION MARK -0x93 0x201C #LEFT DOUBLE QUOTATION MARK -0x94 0x201D #RIGHT DOUBLE QUOTATION MARK -0x95 0x2022 #BULLET -0x96 0x2013 #EN DASH -0x97 0x2014 #EM DASH -0x98 0x02DC #SMALL TILDE -0x99 0x2122 #TRADE MARK SIGN -0x9A #UNDEFINED -0x9B 0x203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK -0x9C #UNDEFINED -0x9D #UNDEFINED -0x9E #UNDEFINED -0x9F #UNDEFINED -0xA0 0x00A0 #NO-BREAK SPACE -0xA1 0x00A1 #INVERTED EXCLAMATION MARK -0xA2 0x00A2 #CENT SIGN -0xA3 0x00A3 #POUND SIGN -0xA4 0x20AA #NEW SHEQEL SIGN -0xA5 0x00A5 #YEN SIGN -0xA6 0x00A6 #BROKEN BAR -0xA7 0x00A7 #SECTION SIGN -0xA8 0x00A8 #DIAERESIS -0xA9 0x00A9 #COPYRIGHT SIGN -0xAA 0x00D7 #MULTIPLICATION SIGN -0xAB 0x00AB #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC #NOT SIGN -0xAD 0x00AD #SOFT HYPHEN -0xAE 0x00AE #REGISTERED SIGN -0xAF 0x00AF #MACRON -0xB0 0x00B0 #DEGREE SIGN -0xB1 0x00B1 #PLUS-MINUS SIGN -0xB2 0x00B2 #SUPERSCRIPT TWO -0xB3 0x00B3 #SUPERSCRIPT THREE -0xB4 0x00B4 #ACUTE ACCENT -0xB5 0x00B5 #MICRO SIGN -0xB6 0x00B6 #PILCROW SIGN -0xB7 0x00B7 #MIDDLE DOT -0xB8 0x00B8 #CEDILLA -0xB9 0x00B9 #SUPERSCRIPT ONE -0xBA 0x00F7 #DIVISION SIGN -0xBB 0x00BB #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x00BC #VULGAR FRACTION ONE QUARTER -0xBD 0x00BD #VULGAR FRACTION ONE HALF -0xBE 0x00BE #VULGAR FRACTION THREE QUARTERS -0xBF 0x00BF #INVERTED QUESTION MARK -0xC0 0x05B0 #HEBREW POINT SHEVA -0xC1 0x05B1 #HEBREW POINT HATAF SEGOL -0xC2 0x05B2 #HEBREW POINT HATAF PATAH -0xC3 0x05B3 #HEBREW POINT HATAF QAMATS -0xC4 0x05B4 #HEBREW POINT HIRIQ -0xC5 0x05B5 #HEBREW POINT TSERE -0xC6 0x05B6 #HEBREW POINT SEGOL -0xC7 0x05B7 #HEBREW POINT PATAH -0xC8 0x05B8 #HEBREW POINT QAMATS -0xC9 0x05B9 #HEBREW POINT HOLAM -0xCA #UNDEFINED -0xCB 0x05BB #HEBREW POINT QUBUTS -0xCC 0x05BC #HEBREW POINT DAGESH OR MAPIQ -0xCD 0x05BD #HEBREW POINT METEG -0xCE 0x05BE #HEBREW PUNCTUATION MAQAF -0xCF 0x05BF #HEBREW POINT RAFE -0xD0 0x05C0 #HEBREW PUNCTUATION PASEQ -0xD1 0x05C1 #HEBREW POINT SHIN DOT -0xD2 0x05C2 #HEBREW POINT SIN DOT -0xD3 0x05C3 #HEBREW PUNCTUATION SOF PASUQ -0xD4 0x05F0 #HEBREW LIGATURE YIDDISH DOUBLE VAV -0xD5 0x05F1 #HEBREW LIGATURE YIDDISH VAV YOD -0xD6 0x05F2 #HEBREW LIGATURE YIDDISH DOUBLE YOD -0xD7 0x05F3 #HEBREW PUNCTUATION GERESH -0xD8 0x05F4 #HEBREW PUNCTUATION GERSHAYIM -0xD9 #UNDEFINED -0xDA #UNDEFINED -0xDB #UNDEFINED -0xDC #UNDEFINED -0xDD #UNDEFINED -0xDE #UNDEFINED -0xDF #UNDEFINED -0xE0 0x05D0 #HEBREW LETTER ALEF -0xE1 0x05D1 #HEBREW LETTER BET -0xE2 0x05D2 #HEBREW LETTER GIMEL -0xE3 0x05D3 #HEBREW LETTER DALET -0xE4 0x05D4 #HEBREW LETTER HE -0xE5 0x05D5 #HEBREW LETTER VAV -0xE6 0x05D6 #HEBREW LETTER ZAYIN -0xE7 0x05D7 #HEBREW LETTER HET -0xE8 0x05D8 #HEBREW LETTER TET -0xE9 0x05D9 #HEBREW LETTER YOD -0xEA 0x05DA #HEBREW LETTER FINAL KAF -0xEB 0x05DB #HEBREW LETTER KAF -0xEC 0x05DC #HEBREW LETTER LAMED -0xED 0x05DD #HEBREW LETTER FINAL MEM -0xEE 0x05DE #HEBREW LETTER MEM -0xEF 0x05DF #HEBREW LETTER FINAL NUN -0xF0 0x05E0 #HEBREW LETTER NUN -0xF1 0x05E1 #HEBREW LETTER SAMEKH -0xF2 0x05E2 #HEBREW LETTER AYIN -0xF3 0x05E3 #HEBREW LETTER FINAL PE -0xF4 0x05E4 #HEBREW LETTER PE -0xF5 0x05E5 #HEBREW LETTER FINAL TSADI -0xF6 0x05E6 #HEBREW LETTER TSADI -0xF7 0x05E7 #HEBREW LETTER QOF -0xF8 0x05E8 #HEBREW LETTER RESH -0xF9 0x05E9 #HEBREW LETTER SHIN -0xFA 0x05EA #HEBREW LETTER TAV -0xFB #UNDEFINED -0xFC #UNDEFINED -0xFD 0x200E #LEFT-TO-RIGHT MARK -0xFE 0x200F #RIGHT-TO-LEFT MARK -0xFF #UNDEFINED diff --git a/program/lib/encoding/CP1256.map b/program/lib/encoding/CP1256.map deleted file mode 100644 index 0edd081..0000000 --- a/program/lib/encoding/CP1256.map +++ /dev/null @@ -1,274 +0,0 @@ -# -# Name: cp1256 to Unicode table -# Unicode version: 2.1 -# Table version: 2.01 -# Table format: Format A -# Date: 01/5/99 -# -# Contact: cpxlate@microsoft.com -# -# General notes: none -# -# Format: Three tab-separated columns -# Column #1 is the cp1256 code (in hex) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 is the Unicode name (follows a comment sign, '#') -# -# The entries are in cp1256 order -# -0x00 0x0000 #NULL -0x01 0x0001 #START OF HEADING -0x02 0x0002 #START OF TEXT -0x03 0x0003 #END OF TEXT -0x04 0x0004 #END OF TRANSMISSION -0x05 0x0005 #ENQUIRY -0x06 0x0006 #ACKNOWLEDGE -0x07 0x0007 #BELL -0x08 0x0008 #BACKSPACE -0x09 0x0009 #HORIZONTAL TABULATION -0x0A 0x000A #LINE FEED -0x0B 0x000B #VERTICAL TABULATION -0x0C 0x000C #FORM FEED -0x0D 0x000D #CARRIAGE RETURN -0x0E 0x000E #SHIFT OUT -0x0F 0x000F #SHIFT IN -0x10 0x0010 #DATA LINK ESCAPE -0x11 0x0011 #DEVICE CONTROL ONE -0x12 0x0012 #DEVICE CONTROL TWO -0x13 0x0013 #DEVICE CONTROL THREE -0x14 0x0014 #DEVICE CONTROL FOUR -0x15 0x0015 #NEGATIVE ACKNOWLEDGE -0x16 0x0016 #SYNCHRONOUS IDLE -0x17 0x0017 #END OF TRANSMISSION BLOCK -0x18 0x0018 #CANCEL -0x19 0x0019 #END OF MEDIUM -0x1A 0x001A #SUBSTITUTE -0x1B 0x001B #ESCAPE -0x1C 0x001C #FILE SEPARATOR -0x1D 0x001D #GROUP SEPARATOR -0x1E 0x001E #RECORD SEPARATOR -0x1F 0x001F #UNIT SEPARATOR -0x20 0x0020 #SPACE -0x21 0x0021 #EXCLAMATION MARK -0x22 0x0022 #QUOTATION MARK -0x23 0x0023 #NUMBER SIGN -0x24 0x0024 #DOLLAR SIGN -0x25 0x0025 #PERCENT SIGN -0x26 0x0026 #AMPERSAND -0x27 0x0027 #APOSTROPHE -0x28 0x0028 #LEFT PARENTHESIS -0x29 0x0029 #RIGHT PARENTHESIS -0x2A 0x002A #ASTERISK -0x2B 0x002B #PLUS SIGN -0x2C 0x002C #COMMA -0x2D 0x002D #HYPHEN-MINUS -0x2E 0x002E #FULL STOP -0x2F 0x002F #SOLIDUS -0x30 0x0030 #DIGIT ZERO -0x31 0x0031 #DIGIT ONE -0x32 0x0032 #DIGIT TWO -0x33 0x0033 #DIGIT THREE -0x34 0x0034 #DIGIT FOUR -0x35 0x0035 #DIGIT FIVE -0x36 0x0036 #DIGIT SIX -0x37 0x0037 #DIGIT SEVEN -0x38 0x0038 #DIGIT EIGHT -0x39 0x0039 #DIGIT NINE -0x3A 0x003A #COLON -0x3B 0x003B #SEMICOLON -0x3C 0x003C #LESS-THAN SIGN -0x3D 0x003D #EQUALS SIGN -0x3E 0x003E #GREATER-THAN SIGN -0x3F 0x003F #QUESTION MARK -0x40 0x0040 #COMMERCIAL AT -0x41 0x0041 #LATIN CAPITAL LETTER A -0x42 0x0042 #LATIN CAPITAL LETTER B -0x43 0x0043 #LATIN CAPITAL LETTER C -0x44 0x0044 #LATIN CAPITAL LETTER D -0x45 0x0045 #LATIN CAPITAL LETTER E -0x46 0x0046 #LATIN CAPITAL LETTER F -0x47 0x0047 #LATIN CAPITAL LETTER G -0x48 0x0048 #LATIN CAPITAL LETTER H -0x49 0x0049 #LATIN CAPITAL LETTER I -0x4A 0x004A #LATIN CAPITAL LETTER J -0x4B 0x004B #LATIN CAPITAL LETTER K -0x4C 0x004C #LATIN CAPITAL LETTER L -0x4D 0x004D #LATIN CAPITAL LETTER M -0x4E 0x004E #LATIN CAPITAL LETTER N -0x4F 0x004F #LATIN CAPITAL LETTER O -0x50 0x0050 #LATIN CAPITAL LETTER P -0x51 0x0051 #LATIN CAPITAL LETTER Q -0x52 0x0052 #LATIN CAPITAL LETTER R -0x53 0x0053 #LATIN CAPITAL LETTER S -0x54 0x0054 #LATIN CAPITAL LETTER T -0x55 0x0055 #LATIN CAPITAL LETTER U -0x56 0x0056 #LATIN CAPITAL LETTER V -0x57 0x0057 #LATIN CAPITAL LETTER W -0x58 0x0058 #LATIN CAPITAL LETTER X -0x59 0x0059 #LATIN CAPITAL LETTER Y -0x5A 0x005A #LATIN CAPITAL LETTER Z -0x5B 0x005B #LEFT SQUARE BRACKET -0x5C 0x005C #REVERSE SOLIDUS -0x5D 0x005D #RIGHT SQUARE BRACKET -0x5E 0x005E #CIRCUMFLEX ACCENT -0x5F 0x005F #LOW LINE -0x60 0x0060 #GRAVE ACCENT -0x61 0x0061 #LATIN SMALL LETTER A -0x62 0x0062 #LATIN SMALL LETTER B -0x63 0x0063 #LATIN SMALL LETTER C -0x64 0x0064 #LATIN SMALL LETTER D -0x65 0x0065 #LATIN SMALL LETTER E -0x66 0x0066 #LATIN SMALL LETTER F -0x67 0x0067 #LATIN SMALL LETTER G -0x68 0x0068 #LATIN SMALL LETTER H -0x69 0x0069 #LATIN SMALL LETTER I -0x6A 0x006A #LATIN SMALL LETTER J -0x6B 0x006B #LATIN SMALL LETTER K -0x6C 0x006C #LATIN SMALL LETTER L -0x6D 0x006D #LATIN SMALL LETTER M -0x6E 0x006E #LATIN SMALL LETTER N -0x6F 0x006F #LATIN SMALL LETTER O -0x70 0x0070 #LATIN SMALL LETTER P -0x71 0x0071 #LATIN SMALL LETTER Q -0x72 0x0072 #LATIN SMALL LETTER R -0x73 0x0073 #LATIN SMALL LETTER S -0x74 0x0074 #LATIN SMALL LETTER T -0x75 0x0075 #LATIN SMALL LETTER U -0x76 0x0076 #LATIN SMALL LETTER V -0x77 0x0077 #LATIN SMALL LETTER W -0x78 0x0078 #LATIN SMALL LETTER X -0x79 0x0079 #LATIN SMALL LETTER Y -0x7A 0x007A #LATIN SMALL LETTER Z -0x7B 0x007B #LEFT CURLY BRACKET -0x7C 0x007C #VERTICAL LINE -0x7D 0x007D #RIGHT CURLY BRACKET -0x7E 0x007E #TILDE -0x7F 0x007F #DELETE -0x80 0x20AC #EURO SIGN -0x81 0x067E #ARABIC LETTER PEH -0x82 0x201A #SINGLE LOW-9 QUOTATION MARK -0x83 0x0192 #LATIN SMALL LETTER F WITH HOOK -0x84 0x201E #DOUBLE LOW-9 QUOTATION MARK -0x85 0x2026 #HORIZONTAL ELLIPSIS -0x86 0x2020 #DAGGER -0x87 0x2021 #DOUBLE DAGGER -0x88 0x02C6 #MODIFIER LETTER CIRCUMFLEX ACCENT -0x89 0x2030 #PER MILLE SIGN -0x8A 0x0679 #ARABIC LETTER TTEH -0x8B 0x2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK -0x8C 0x0152 #LATIN CAPITAL LIGATURE OE -0x8D 0x0686 #ARABIC LETTER TCHEH -0x8E 0x0698 #ARABIC LETTER JEH -0x8F 0x0688 #ARABIC LETTER DDAL -0x90 0x06AF #ARABIC LETTER GAF -0x91 0x2018 #LEFT SINGLE QUOTATION MARK -0x92 0x2019 #RIGHT SINGLE QUOTATION MARK -0x93 0x201C #LEFT DOUBLE QUOTATION MARK -0x94 0x201D #RIGHT DOUBLE QUOTATION MARK -0x95 0x2022 #BULLET -0x96 0x2013 #EN DASH -0x97 0x2014 #EM DASH -0x98 0x06A9 #ARABIC LETTER KEHEH -0x99 0x2122 #TRADE MARK SIGN -0x9A 0x0691 #ARABIC LETTER RREH -0x9B 0x203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK -0x9C 0x0153 #LATIN SMALL LIGATURE OE -0x9D 0x200C #ZERO WIDTH NON-JOINER -0x9E 0x200D #ZERO WIDTH JOINER -0x9F 0x06BA #ARABIC LETTER NOON GHUNNA -0xA0 0x00A0 #NO-BREAK SPACE -0xA1 0x060C #ARABIC COMMA -0xA2 0x00A2 #CENT SIGN -0xA3 0x00A3 #POUND SIGN -0xA4 0x00A4 #CURRENCY SIGN -0xA5 0x00A5 #YEN SIGN -0xA6 0x00A6 #BROKEN BAR -0xA7 0x00A7 #SECTION SIGN -0xA8 0x00A8 #DIAERESIS -0xA9 0x00A9 #COPYRIGHT SIGN -0xAA 0x06BE #ARABIC LETTER HEH DOACHASHMEE -0xAB 0x00AB #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC #NOT SIGN -0xAD 0x00AD #SOFT HYPHEN -0xAE 0x00AE #REGISTERED SIGN -0xAF 0x00AF #MACRON -0xB0 0x00B0 #DEGREE SIGN -0xB1 0x00B1 #PLUS-MINUS SIGN -0xB2 0x00B2 #SUPERSCRIPT TWO -0xB3 0x00B3 #SUPERSCRIPT THREE -0xB4 0x00B4 #ACUTE ACCENT -0xB5 0x00B5 #MICRO SIGN -0xB6 0x00B6 #PILCROW SIGN -0xB7 0x00B7 #MIDDLE DOT -0xB8 0x00B8 #CEDILLA -0xB9 0x00B9 #SUPERSCRIPT ONE -0xBA 0x061B #ARABIC SEMICOLON -0xBB 0x00BB #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x00BC #VULGAR FRACTION ONE QUARTER -0xBD 0x00BD #VULGAR FRACTION ONE HALF -0xBE 0x00BE #VULGAR FRACTION THREE QUARTERS -0xBF 0x061F #ARABIC QUESTION MARK -0xC0 0x06C1 #ARABIC LETTER HEH GOAL -0xC1 0x0621 #ARABIC LETTER HAMZA -0xC2 0x0622 #ARABIC LETTER ALEF WITH MADDA ABOVE -0xC3 0x0623 #ARABIC LETTER ALEF WITH HAMZA ABOVE -0xC4 0x0624 #ARABIC LETTER WAW WITH HAMZA ABOVE -0xC5 0x0625 #ARABIC LETTER ALEF WITH HAMZA BELOW -0xC6 0x0626 #ARABIC LETTER YEH WITH HAMZA ABOVE -0xC7 0x0627 #ARABIC LETTER ALEF -0xC8 0x0628 #ARABIC LETTER BEH -0xC9 0x0629 #ARABIC LETTER TEH MARBUTA -0xCA 0x062A #ARABIC LETTER TEH -0xCB 0x062B #ARABIC LETTER THEH -0xCC 0x062C #ARABIC LETTER JEEM -0xCD 0x062D #ARABIC LETTER HAH -0xCE 0x062E #ARABIC LETTER KHAH -0xCF 0x062F #ARABIC LETTER DAL -0xD0 0x0630 #ARABIC LETTER THAL -0xD1 0x0631 #ARABIC LETTER REH -0xD2 0x0632 #ARABIC LETTER ZAIN -0xD3 0x0633 #ARABIC LETTER SEEN -0xD4 0x0634 #ARABIC LETTER SHEEN -0xD5 0x0635 #ARABIC LETTER SAD -0xD6 0x0636 #ARABIC LETTER DAD -0xD7 0x00D7 #MULTIPLICATION SIGN -0xD8 0x0637 #ARABIC LETTER TAH -0xD9 0x0638 #ARABIC LETTER ZAH -0xDA 0x0639 #ARABIC LETTER AIN -0xDB 0x063A #ARABIC LETTER GHAIN -0xDC 0x0640 #ARABIC TATWEEL -0xDD 0x0641 #ARABIC LETTER FEH -0xDE 0x0642 #ARABIC LETTER QAF -0xDF 0x0643 #ARABIC LETTER KAF -0xE0 0x00E0 #LATIN SMALL LETTER A WITH GRAVE -0xE1 0x0644 #ARABIC LETTER LAM -0xE2 0x00E2 #LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE3 0x0645 #ARABIC LETTER MEEM -0xE4 0x0646 #ARABIC LETTER NOON -0xE5 0x0647 #ARABIC LETTER HEH -0xE6 0x0648 #ARABIC LETTER WAW -0xE7 0x00E7 #LATIN SMALL LETTER C WITH CEDILLA -0xE8 0x00E8 #LATIN SMALL LETTER E WITH GRAVE -0xE9 0x00E9 #LATIN SMALL LETTER E WITH ACUTE -0xEA 0x00EA #LATIN SMALL LETTER E WITH CIRCUMFLEX -0xEB 0x00EB #LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x0649 #ARABIC LETTER ALEF MAKSURA -0xED 0x064A #ARABIC LETTER YEH -0xEE 0x00EE #LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x00EF #LATIN SMALL LETTER I WITH DIAERESIS -0xF0 0x064B #ARABIC FATHATAN -0xF1 0x064C #ARABIC DAMMATAN -0xF2 0x064D #ARABIC KASRATAN -0xF3 0x064E #ARABIC FATHA -0xF4 0x00F4 #LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x064F #ARABIC DAMMA -0xF6 0x0650 #ARABIC KASRA -0xF7 0x00F7 #DIVISION SIGN -0xF8 0x0651 #ARABIC SHADDA -0xF9 0x00F9 #LATIN SMALL LETTER U WITH GRAVE -0xFA 0x0652 #ARABIC SUKUN -0xFB 0x00FB #LATIN SMALL LETTER U WITH CIRCUMFLEX -0xFC 0x00FC #LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x200E #LEFT-TO-RIGHT MARK -0xFE 0x200F #RIGHT-TO-LEFT MARK -0xFF 0x06D2 #ARABIC LETTER YEH BARREE diff --git a/program/lib/encoding/CP1257.map b/program/lib/encoding/CP1257.map deleted file mode 100644 index 97979d9..0000000 --- a/program/lib/encoding/CP1257.map +++ /dev/null @@ -1,274 +0,0 @@ -# -# Name: cp1257 to Unicode table -# Unicode version: 2.0 -# Table version: 2.01 -# Table format: Format A -# Date: 04/15/98 -# -# Contact: cpxlate@microsoft.com -# -# General notes: none -# -# Format: Three tab-separated columns -# Column #1 is the cp1257 code (in hex) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 is the Unicode name (follows a comment sign, '#') -# -# The entries are in cp1257 order -# -0x00 0x0000 #NULL -0x01 0x0001 #START OF HEADING -0x02 0x0002 #START OF TEXT -0x03 0x0003 #END OF TEXT -0x04 0x0004 #END OF TRANSMISSION -0x05 0x0005 #ENQUIRY -0x06 0x0006 #ACKNOWLEDGE -0x07 0x0007 #BELL -0x08 0x0008 #BACKSPACE -0x09 0x0009 #HORIZONTAL TABULATION -0x0A 0x000A #LINE FEED -0x0B 0x000B #VERTICAL TABULATION -0x0C 0x000C #FORM FEED -0x0D 0x000D #CARRIAGE RETURN -0x0E 0x000E #SHIFT OUT -0x0F 0x000F #SHIFT IN -0x10 0x0010 #DATA LINK ESCAPE -0x11 0x0011 #DEVICE CONTROL ONE -0x12 0x0012 #DEVICE CONTROL TWO -0x13 0x0013 #DEVICE CONTROL THREE -0x14 0x0014 #DEVICE CONTROL FOUR -0x15 0x0015 #NEGATIVE ACKNOWLEDGE -0x16 0x0016 #SYNCHRONOUS IDLE -0x17 0x0017 #END OF TRANSMISSION BLOCK -0x18 0x0018 #CANCEL -0x19 0x0019 #END OF MEDIUM -0x1A 0x001A #SUBSTITUTE -0x1B 0x001B #ESCAPE -0x1C 0x001C #FILE SEPARATOR -0x1D 0x001D #GROUP SEPARATOR -0x1E 0x001E #RECORD SEPARATOR -0x1F 0x001F #UNIT SEPARATOR -0x20 0x0020 #SPACE -0x21 0x0021 #EXCLAMATION MARK -0x22 0x0022 #QUOTATION MARK -0x23 0x0023 #NUMBER SIGN -0x24 0x0024 #DOLLAR SIGN -0x25 0x0025 #PERCENT SIGN -0x26 0x0026 #AMPERSAND -0x27 0x0027 #APOSTROPHE -0x28 0x0028 #LEFT PARENTHESIS -0x29 0x0029 #RIGHT PARENTHESIS -0x2A 0x002A #ASTERISK -0x2B 0x002B #PLUS SIGN -0x2C 0x002C #COMMA -0x2D 0x002D #HYPHEN-MINUS -0x2E 0x002E #FULL STOP -0x2F 0x002F #SOLIDUS -0x30 0x0030 #DIGIT ZERO -0x31 0x0031 #DIGIT ONE -0x32 0x0032 #DIGIT TWO -0x33 0x0033 #DIGIT THREE -0x34 0x0034 #DIGIT FOUR -0x35 0x0035 #DIGIT FIVE -0x36 0x0036 #DIGIT SIX -0x37 0x0037 #DIGIT SEVEN -0x38 0x0038 #DIGIT EIGHT -0x39 0x0039 #DIGIT NINE -0x3A 0x003A #COLON -0x3B 0x003B #SEMICOLON -0x3C 0x003C #LESS-THAN SIGN -0x3D 0x003D #EQUALS SIGN -0x3E 0x003E #GREATER-THAN SIGN -0x3F 0x003F #QUESTION MARK -0x40 0x0040 #COMMERCIAL AT -0x41 0x0041 #LATIN CAPITAL LETTER A -0x42 0x0042 #LATIN CAPITAL LETTER B -0x43 0x0043 #LATIN CAPITAL LETTER C -0x44 0x0044 #LATIN CAPITAL LETTER D -0x45 0x0045 #LATIN CAPITAL LETTER E -0x46 0x0046 #LATIN CAPITAL LETTER F -0x47 0x0047 #LATIN CAPITAL LETTER G -0x48 0x0048 #LATIN CAPITAL LETTER H -0x49 0x0049 #LATIN CAPITAL LETTER I -0x4A 0x004A #LATIN CAPITAL LETTER J -0x4B 0x004B #LATIN CAPITAL LETTER K -0x4C 0x004C #LATIN CAPITAL LETTER L -0x4D 0x004D #LATIN CAPITAL LETTER M -0x4E 0x004E #LATIN CAPITAL LETTER N -0x4F 0x004F #LATIN CAPITAL LETTER O -0x50 0x0050 #LATIN CAPITAL LETTER P -0x51 0x0051 #LATIN CAPITAL LETTER Q -0x52 0x0052 #LATIN CAPITAL LETTER R -0x53 0x0053 #LATIN CAPITAL LETTER S -0x54 0x0054 #LATIN CAPITAL LETTER T -0x55 0x0055 #LATIN CAPITAL LETTER U -0x56 0x0056 #LATIN CAPITAL LETTER V -0x57 0x0057 #LATIN CAPITAL LETTER W -0x58 0x0058 #LATIN CAPITAL LETTER X -0x59 0x0059 #LATIN CAPITAL LETTER Y -0x5A 0x005A #LATIN CAPITAL LETTER Z -0x5B 0x005B #LEFT SQUARE BRACKET -0x5C 0x005C #REVERSE SOLIDUS -0x5D 0x005D #RIGHT SQUARE BRACKET -0x5E 0x005E #CIRCUMFLEX ACCENT -0x5F 0x005F #LOW LINE -0x60 0x0060 #GRAVE ACCENT -0x61 0x0061 #LATIN SMALL LETTER A -0x62 0x0062 #LATIN SMALL LETTER B -0x63 0x0063 #LATIN SMALL LETTER C -0x64 0x0064 #LATIN SMALL LETTER D -0x65 0x0065 #LATIN SMALL LETTER E -0x66 0x0066 #LATIN SMALL LETTER F -0x67 0x0067 #LATIN SMALL LETTER G -0x68 0x0068 #LATIN SMALL LETTER H -0x69 0x0069 #LATIN SMALL LETTER I -0x6A 0x006A #LATIN SMALL LETTER J -0x6B 0x006B #LATIN SMALL LETTER K -0x6C 0x006C #LATIN SMALL LETTER L -0x6D 0x006D #LATIN SMALL LETTER M -0x6E 0x006E #LATIN SMALL LETTER N -0x6F 0x006F #LATIN SMALL LETTER O -0x70 0x0070 #LATIN SMALL LETTER P -0x71 0x0071 #LATIN SMALL LETTER Q -0x72 0x0072 #LATIN SMALL LETTER R -0x73 0x0073 #LATIN SMALL LETTER S -0x74 0x0074 #LATIN SMALL LETTER T -0x75 0x0075 #LATIN SMALL LETTER U -0x76 0x0076 #LATIN SMALL LETTER V -0x77 0x0077 #LATIN SMALL LETTER W -0x78 0x0078 #LATIN SMALL LETTER X -0x79 0x0079 #LATIN SMALL LETTER Y -0x7A 0x007A #LATIN SMALL LETTER Z -0x7B 0x007B #LEFT CURLY BRACKET -0x7C 0x007C #VERTICAL LINE -0x7D 0x007D #RIGHT CURLY BRACKET -0x7E 0x007E #TILDE -0x7F 0x007F #DELETE -0x80 0x20AC #EURO SIGN -0x81 #UNDEFINED -0x82 0x201A #SINGLE LOW-9 QUOTATION MARK -0x83 #UNDEFINED -0x84 0x201E #DOUBLE LOW-9 QUOTATION MARK -0x85 0x2026 #HORIZONTAL ELLIPSIS -0x86 0x2020 #DAGGER -0x87 0x2021 #DOUBLE DAGGER -0x88 #UNDEFINED -0x89 0x2030 #PER MILLE SIGN -0x8A #UNDEFINED -0x8B 0x2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK -0x8C #UNDEFINED -0x8D 0x00A8 #DIAERESIS -0x8E 0x02C7 #CARON -0x8F 0x00B8 #CEDILLA -0x90 #UNDEFINED -0x91 0x2018 #LEFT SINGLE QUOTATION MARK -0x92 0x2019 #RIGHT SINGLE QUOTATION MARK -0x93 0x201C #LEFT DOUBLE QUOTATION MARK -0x94 0x201D #RIGHT DOUBLE QUOTATION MARK -0x95 0x2022 #BULLET -0x96 0x2013 #EN DASH -0x97 0x2014 #EM DASH -0x98 #UNDEFINED -0x99 0x2122 #TRADE MARK SIGN -0x9A #UNDEFINED -0x9B 0x203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK -0x9C #UNDEFINED -0x9D 0x00AF #MACRON -0x9E 0x02DB #OGONEK -0x9F #UNDEFINED -0xA0 0x00A0 #NO-BREAK SPACE -0xA1 #UNDEFINED -0xA2 0x00A2 #CENT SIGN -0xA3 0x00A3 #POUND SIGN -0xA4 0x00A4 #CURRENCY SIGN -0xA5 #UNDEFINED -0xA6 0x00A6 #BROKEN BAR -0xA7 0x00A7 #SECTION SIGN -0xA8 0x00D8 #LATIN CAPITAL LETTER O WITH STROKE -0xA9 0x00A9 #COPYRIGHT SIGN -0xAA 0x0156 #LATIN CAPITAL LETTER R WITH CEDILLA -0xAB 0x00AB #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC #NOT SIGN -0xAD 0x00AD #SOFT HYPHEN -0xAE 0x00AE #REGISTERED SIGN -0xAF 0x00C6 #LATIN CAPITAL LETTER AE -0xB0 0x00B0 #DEGREE SIGN -0xB1 0x00B1 #PLUS-MINUS SIGN -0xB2 0x00B2 #SUPERSCRIPT TWO -0xB3 0x00B3 #SUPERSCRIPT THREE -0xB4 0x00B4 #ACUTE ACCENT -0xB5 0x00B5 #MICRO SIGN -0xB6 0x00B6 #PILCROW SIGN -0xB7 0x00B7 #MIDDLE DOT -0xB8 0x00F8 #LATIN SMALL LETTER O WITH STROKE -0xB9 0x00B9 #SUPERSCRIPT ONE -0xBA 0x0157 #LATIN SMALL LETTER R WITH CEDILLA -0xBB 0x00BB #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x00BC #VULGAR FRACTION ONE QUARTER -0xBD 0x00BD #VULGAR FRACTION ONE HALF -0xBE 0x00BE #VULGAR FRACTION THREE QUARTERS -0xBF 0x00E6 #LATIN SMALL LETTER AE -0xC0 0x0104 #LATIN CAPITAL LETTER A WITH OGONEK -0xC1 0x012E #LATIN CAPITAL LETTER I WITH OGONEK -0xC2 0x0100 #LATIN CAPITAL LETTER A WITH MACRON -0xC3 0x0106 #LATIN CAPITAL LETTER C WITH ACUTE -0xC4 0x00C4 #LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x00C5 #LATIN CAPITAL LETTER A WITH RING ABOVE -0xC6 0x0118 #LATIN CAPITAL LETTER E WITH OGONEK -0xC7 0x0112 #LATIN CAPITAL LETTER E WITH MACRON -0xC8 0x010C #LATIN CAPITAL LETTER C WITH CARON -0xC9 0x00C9 #LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x0179 #LATIN CAPITAL LETTER Z WITH ACUTE -0xCB 0x0116 #LATIN CAPITAL LETTER E WITH DOT ABOVE -0xCC 0x0122 #LATIN CAPITAL LETTER G WITH CEDILLA -0xCD 0x0136 #LATIN CAPITAL LETTER K WITH CEDILLA -0xCE 0x012A #LATIN CAPITAL LETTER I WITH MACRON -0xCF 0x013B #LATIN CAPITAL LETTER L WITH CEDILLA -0xD0 0x0160 #LATIN CAPITAL LETTER S WITH CARON -0xD1 0x0143 #LATIN CAPITAL LETTER N WITH ACUTE -0xD2 0x0145 #LATIN CAPITAL LETTER N WITH CEDILLA -0xD3 0x00D3 #LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x014C #LATIN CAPITAL LETTER O WITH MACRON -0xD5 0x00D5 #LATIN CAPITAL LETTER O WITH TILDE -0xD6 0x00D6 #LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x00D7 #MULTIPLICATION SIGN -0xD8 0x0172 #LATIN CAPITAL LETTER U WITH OGONEK -0xD9 0x0141 #LATIN CAPITAL LETTER L WITH STROKE -0xDA 0x015A #LATIN CAPITAL LETTER S WITH ACUTE -0xDB 0x016A #LATIN CAPITAL LETTER U WITH MACRON -0xDC 0x00DC #LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x017B #LATIN CAPITAL LETTER Z WITH DOT ABOVE -0xDE 0x017D #LATIN CAPITAL LETTER Z WITH CARON -0xDF 0x00DF #LATIN SMALL LETTER SHARP S -0xE0 0x0105 #LATIN SMALL LETTER A WITH OGONEK -0xE1 0x012F #LATIN SMALL LETTER I WITH OGONEK -0xE2 0x0101 #LATIN SMALL LETTER A WITH MACRON -0xE3 0x0107 #LATIN SMALL LETTER C WITH ACUTE -0xE4 0x00E4 #LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x00E5 #LATIN SMALL LETTER A WITH RING ABOVE -0xE6 0x0119 #LATIN SMALL LETTER E WITH OGONEK -0xE7 0x0113 #LATIN SMALL LETTER E WITH MACRON -0xE8 0x010D #LATIN SMALL LETTER C WITH CARON -0xE9 0x00E9 #LATIN SMALL LETTER E WITH ACUTE -0xEA 0x017A #LATIN SMALL LETTER Z WITH ACUTE -0xEB 0x0117 #LATIN SMALL LETTER E WITH DOT ABOVE -0xEC 0x0123 #LATIN SMALL LETTER G WITH CEDILLA -0xED 0x0137 #LATIN SMALL LETTER K WITH CEDILLA -0xEE 0x012B #LATIN SMALL LETTER I WITH MACRON -0xEF 0x013C #LATIN SMALL LETTER L WITH CEDILLA -0xF0 0x0161 #LATIN SMALL LETTER S WITH CARON -0xF1 0x0144 #LATIN SMALL LETTER N WITH ACUTE -0xF2 0x0146 #LATIN SMALL LETTER N WITH CEDILLA -0xF3 0x00F3 #LATIN SMALL LETTER O WITH ACUTE -0xF4 0x014D #LATIN SMALL LETTER O WITH MACRON -0xF5 0x00F5 #LATIN SMALL LETTER O WITH TILDE -0xF6 0x00F6 #LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x00F7 #DIVISION SIGN -0xF8 0x0173 #LATIN SMALL LETTER U WITH OGONEK -0xF9 0x0142 #LATIN SMALL LETTER L WITH STROKE -0xFA 0x015B #LATIN SMALL LETTER S WITH ACUTE -0xFB 0x016B #LATIN SMALL LETTER U WITH MACRON -0xFC 0x00FC #LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x017C #LATIN SMALL LETTER Z WITH DOT ABOVE -0xFE 0x017E #LATIN SMALL LETTER Z WITH CARON -0xFF 0x02D9 #DOT ABOVE diff --git a/program/lib/encoding/CP1258.map b/program/lib/encoding/CP1258.map deleted file mode 100644 index 392310a..0000000 --- a/program/lib/encoding/CP1258.map +++ /dev/null @@ -1,274 +0,0 @@ -# -# Name: cp1258 to Unicode table -# Unicode version: 2.0 -# Table version: 2.01 -# Table format: Format A -# Date: 04/15/98 -# -# Contact: cpxlate@microsoft.com -# -# General notes: none -# -# Format: Three tab-separated columns -# Column #1 is the cp1258 code (in hex) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 is the Unicode name (follows a comment sign, '#') -# -# The entries are in cp1258 order -# -0x00 0x0000 #NULL -0x01 0x0001 #START OF HEADING -0x02 0x0002 #START OF TEXT -0x03 0x0003 #END OF TEXT -0x04 0x0004 #END OF TRANSMISSION -0x05 0x0005 #ENQUIRY -0x06 0x0006 #ACKNOWLEDGE -0x07 0x0007 #BELL -0x08 0x0008 #BACKSPACE -0x09 0x0009 #HORIZONTAL TABULATION -0x0A 0x000A #LINE FEED -0x0B 0x000B #VERTICAL TABULATION -0x0C 0x000C #FORM FEED -0x0D 0x000D #CARRIAGE RETURN -0x0E 0x000E #SHIFT OUT -0x0F 0x000F #SHIFT IN -0x10 0x0010 #DATA LINK ESCAPE -0x11 0x0011 #DEVICE CONTROL ONE -0x12 0x0012 #DEVICE CONTROL TWO -0x13 0x0013 #DEVICE CONTROL THREE -0x14 0x0014 #DEVICE CONTROL FOUR -0x15 0x0015 #NEGATIVE ACKNOWLEDGE -0x16 0x0016 #SYNCHRONOUS IDLE -0x17 0x0017 #END OF TRANSMISSION BLOCK -0x18 0x0018 #CANCEL -0x19 0x0019 #END OF MEDIUM -0x1A 0x001A #SUBSTITUTE -0x1B 0x001B #ESCAPE -0x1C 0x001C #FILE SEPARATOR -0x1D 0x001D #GROUP SEPARATOR -0x1E 0x001E #RECORD SEPARATOR -0x1F 0x001F #UNIT SEPARATOR -0x20 0x0020 #SPACE -0x21 0x0021 #EXCLAMATION MARK -0x22 0x0022 #QUOTATION MARK -0x23 0x0023 #NUMBER SIGN -0x24 0x0024 #DOLLAR SIGN -0x25 0x0025 #PERCENT SIGN -0x26 0x0026 #AMPERSAND -0x27 0x0027 #APOSTROPHE -0x28 0x0028 #LEFT PARENTHESIS -0x29 0x0029 #RIGHT PARENTHESIS -0x2A 0x002A #ASTERISK -0x2B 0x002B #PLUS SIGN -0x2C 0x002C #COMMA -0x2D 0x002D #HYPHEN-MINUS -0x2E 0x002E #FULL STOP -0x2F 0x002F #SOLIDUS -0x30 0x0030 #DIGIT ZERO -0x31 0x0031 #DIGIT ONE -0x32 0x0032 #DIGIT TWO -0x33 0x0033 #DIGIT THREE -0x34 0x0034 #DIGIT FOUR -0x35 0x0035 #DIGIT FIVE -0x36 0x0036 #DIGIT SIX -0x37 0x0037 #DIGIT SEVEN -0x38 0x0038 #DIGIT EIGHT -0x39 0x0039 #DIGIT NINE -0x3A 0x003A #COLON -0x3B 0x003B #SEMICOLON -0x3C 0x003C #LESS-THAN SIGN -0x3D 0x003D #EQUALS SIGN -0x3E 0x003E #GREATER-THAN SIGN -0x3F 0x003F #QUESTION MARK -0x40 0x0040 #COMMERCIAL AT -0x41 0x0041 #LATIN CAPITAL LETTER A -0x42 0x0042 #LATIN CAPITAL LETTER B -0x43 0x0043 #LATIN CAPITAL LETTER C -0x44 0x0044 #LATIN CAPITAL LETTER D -0x45 0x0045 #LATIN CAPITAL LETTER E -0x46 0x0046 #LATIN CAPITAL LETTER F -0x47 0x0047 #LATIN CAPITAL LETTER G -0x48 0x0048 #LATIN CAPITAL LETTER H -0x49 0x0049 #LATIN CAPITAL LETTER I -0x4A 0x004A #LATIN CAPITAL LETTER J -0x4B 0x004B #LATIN CAPITAL LETTER K -0x4C 0x004C #LATIN CAPITAL LETTER L -0x4D 0x004D #LATIN CAPITAL LETTER M -0x4E 0x004E #LATIN CAPITAL LETTER N -0x4F 0x004F #LATIN CAPITAL LETTER O -0x50 0x0050 #LATIN CAPITAL LETTER P -0x51 0x0051 #LATIN CAPITAL LETTER Q -0x52 0x0052 #LATIN CAPITAL LETTER R -0x53 0x0053 #LATIN CAPITAL LETTER S -0x54 0x0054 #LATIN CAPITAL LETTER T -0x55 0x0055 #LATIN CAPITAL LETTER U -0x56 0x0056 #LATIN CAPITAL LETTER V -0x57 0x0057 #LATIN CAPITAL LETTER W -0x58 0x0058 #LATIN CAPITAL LETTER X -0x59 0x0059 #LATIN CAPITAL LETTER Y -0x5A 0x005A #LATIN CAPITAL LETTER Z -0x5B 0x005B #LEFT SQUARE BRACKET -0x5C 0x005C #REVERSE SOLIDUS -0x5D 0x005D #RIGHT SQUARE BRACKET -0x5E 0x005E #CIRCUMFLEX ACCENT -0x5F 0x005F #LOW LINE -0x60 0x0060 #GRAVE ACCENT -0x61 0x0061 #LATIN SMALL LETTER A -0x62 0x0062 #LATIN SMALL LETTER B -0x63 0x0063 #LATIN SMALL LETTER C -0x64 0x0064 #LATIN SMALL LETTER D -0x65 0x0065 #LATIN SMALL LETTER E -0x66 0x0066 #LATIN SMALL LETTER F -0x67 0x0067 #LATIN SMALL LETTER G -0x68 0x0068 #LATIN SMALL LETTER H -0x69 0x0069 #LATIN SMALL LETTER I -0x6A 0x006A #LATIN SMALL LETTER J -0x6B 0x006B #LATIN SMALL LETTER K -0x6C 0x006C #LATIN SMALL LETTER L -0x6D 0x006D #LATIN SMALL LETTER M -0x6E 0x006E #LATIN SMALL LETTER N -0x6F 0x006F #LATIN SMALL LETTER O -0x70 0x0070 #LATIN SMALL LETTER P -0x71 0x0071 #LATIN SMALL LETTER Q -0x72 0x0072 #LATIN SMALL LETTER R -0x73 0x0073 #LATIN SMALL LETTER S -0x74 0x0074 #LATIN SMALL LETTER T -0x75 0x0075 #LATIN SMALL LETTER U -0x76 0x0076 #LATIN SMALL LETTER V -0x77 0x0077 #LATIN SMALL LETTER W -0x78 0x0078 #LATIN SMALL LETTER X -0x79 0x0079 #LATIN SMALL LETTER Y -0x7A 0x007A #LATIN SMALL LETTER Z -0x7B 0x007B #LEFT CURLY BRACKET -0x7C 0x007C #VERTICAL LINE -0x7D 0x007D #RIGHT CURLY BRACKET -0x7E 0x007E #TILDE -0x7F 0x007F #DELETE -0x80 0x20AC #EURO SIGN -0x81 #UNDEFINED -0x82 0x201A #SINGLE LOW-9 QUOTATION MARK -0x83 0x0192 #LATIN SMALL LETTER F WITH HOOK -0x84 0x201E #DOUBLE LOW-9 QUOTATION MARK -0x85 0x2026 #HORIZONTAL ELLIPSIS -0x86 0x2020 #DAGGER -0x87 0x2021 #DOUBLE DAGGER -0x88 0x02C6 #MODIFIER LETTER CIRCUMFLEX ACCENT -0x89 0x2030 #PER MILLE SIGN -0x8A #UNDEFINED -0x8B 0x2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK -0x8C 0x0152 #LATIN CAPITAL LIGATURE OE -0x8D #UNDEFINED -0x8E #UNDEFINED -0x8F #UNDEFINED -0x90 #UNDEFINED -0x91 0x2018 #LEFT SINGLE QUOTATION MARK -0x92 0x2019 #RIGHT SINGLE QUOTATION MARK -0x93 0x201C #LEFT DOUBLE QUOTATION MARK -0x94 0x201D #RIGHT DOUBLE QUOTATION MARK -0x95 0x2022 #BULLET -0x96 0x2013 #EN DASH -0x97 0x2014 #EM DASH -0x98 0x02DC #SMALL TILDE -0x99 0x2122 #TRADE MARK SIGN -0x9A #UNDEFINED -0x9B 0x203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK -0x9C 0x0153 #LATIN SMALL LIGATURE OE -0x9D #UNDEFINED -0x9E #UNDEFINED -0x9F 0x0178 #LATIN CAPITAL LETTER Y WITH DIAERESIS -0xA0 0x00A0 #NO-BREAK SPACE -0xA1 0x00A1 #INVERTED EXCLAMATION MARK -0xA2 0x00A2 #CENT SIGN -0xA3 0x00A3 #POUND SIGN -0xA4 0x00A4 #CURRENCY SIGN -0xA5 0x00A5 #YEN SIGN -0xA6 0x00A6 #BROKEN BAR -0xA7 0x00A7 #SECTION SIGN -0xA8 0x00A8 #DIAERESIS -0xA9 0x00A9 #COPYRIGHT SIGN -0xAA 0x00AA #FEMININE ORDINAL INDICATOR -0xAB 0x00AB #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC #NOT SIGN -0xAD 0x00AD #SOFT HYPHEN -0xAE 0x00AE #REGISTERED SIGN -0xAF 0x00AF #MACRON -0xB0 0x00B0 #DEGREE SIGN -0xB1 0x00B1 #PLUS-MINUS SIGN -0xB2 0x00B2 #SUPERSCRIPT TWO -0xB3 0x00B3 #SUPERSCRIPT THREE -0xB4 0x00B4 #ACUTE ACCENT -0xB5 0x00B5 #MICRO SIGN -0xB6 0x00B6 #PILCROW SIGN -0xB7 0x00B7 #MIDDLE DOT -0xB8 0x00B8 #CEDILLA -0xB9 0x00B9 #SUPERSCRIPT ONE -0xBA 0x00BA #MASCULINE ORDINAL INDICATOR -0xBB 0x00BB #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x00BC #VULGAR FRACTION ONE QUARTER -0xBD 0x00BD #VULGAR FRACTION ONE HALF -0xBE 0x00BE #VULGAR FRACTION THREE QUARTERS -0xBF 0x00BF #INVERTED QUESTION MARK -0xC0 0x00C0 #LATIN CAPITAL LETTER A WITH GRAVE -0xC1 0x00C1 #LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 #LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC3 0x0102 #LATIN CAPITAL LETTER A WITH BREVE -0xC4 0x00C4 #LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x00C5 #LATIN CAPITAL LETTER A WITH RING ABOVE -0xC6 0x00C6 #LATIN CAPITAL LETTER AE -0xC7 0x00C7 #LATIN CAPITAL LETTER C WITH CEDILLA -0xC8 0x00C8 #LATIN CAPITAL LETTER E WITH GRAVE -0xC9 0x00C9 #LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x00CA #LATIN CAPITAL LETTER E WITH CIRCUMFLEX -0xCB 0x00CB #LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x0300 #COMBINING GRAVE ACCENT -0xCD 0x00CD #LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE #LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x00CF #LATIN CAPITAL LETTER I WITH DIAERESIS -0xD0 0x0110 #LATIN CAPITAL LETTER D WITH STROKE -0xD1 0x00D1 #LATIN CAPITAL LETTER N WITH TILDE -0xD2 0x0309 #COMBINING HOOK ABOVE -0xD3 0x00D3 #LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x00D4 #LATIN CAPITAL LETTER O WITH CIRCUMFLEX -0xD5 0x01A0 #LATIN CAPITAL LETTER O WITH HORN -0xD6 0x00D6 #LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x00D7 #MULTIPLICATION SIGN -0xD8 0x00D8 #LATIN CAPITAL LETTER O WITH STROKE -0xD9 0x00D9 #LATIN CAPITAL LETTER U WITH GRAVE -0xDA 0x00DA #LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x00DB #LATIN CAPITAL LETTER U WITH CIRCUMFLEX -0xDC 0x00DC #LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x01AF #LATIN CAPITAL LETTER U WITH HORN -0xDE 0x0303 #COMBINING TILDE -0xDF 0x00DF #LATIN SMALL LETTER SHARP S -0xE0 0x00E0 #LATIN SMALL LETTER A WITH GRAVE -0xE1 0x00E1 #LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 #LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE3 0x0103 #LATIN SMALL LETTER A WITH BREVE -0xE4 0x00E4 #LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x00E5 #LATIN SMALL LETTER A WITH RING ABOVE -0xE6 0x00E6 #LATIN SMALL LETTER AE -0xE7 0x00E7 #LATIN SMALL LETTER C WITH CEDILLA -0xE8 0x00E8 #LATIN SMALL LETTER E WITH GRAVE -0xE9 0x00E9 #LATIN SMALL LETTER E WITH ACUTE -0xEA 0x00EA #LATIN SMALL LETTER E WITH CIRCUMFLEX -0xEB 0x00EB #LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x0301 #COMBINING ACUTE ACCENT -0xED 0x00ED #LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE #LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x00EF #LATIN SMALL LETTER I WITH DIAERESIS -0xF0 0x0111 #LATIN SMALL LETTER D WITH STROKE -0xF1 0x00F1 #LATIN SMALL LETTER N WITH TILDE -0xF2 0x0323 #COMBINING DOT BELOW -0xF3 0x00F3 #LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 #LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x01A1 #LATIN SMALL LETTER O WITH HORN -0xF6 0x00F6 #LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x00F7 #DIVISION SIGN -0xF8 0x00F8 #LATIN SMALL LETTER O WITH STROKE -0xF9 0x00F9 #LATIN SMALL LETTER U WITH GRAVE -0xFA 0x00FA #LATIN SMALL LETTER U WITH ACUTE -0xFB 0x00FB #LATIN SMALL LETTER U WITH CIRCUMFLEX -0xFC 0x00FC #LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x01B0 #LATIN SMALL LETTER U WITH HORN -0xFE 0x20AB #DONG SIGN -0xFF 0x00FF #LATIN SMALL LETTER Y WITH DIAERESIS diff --git a/program/lib/encoding/ISO-8859-1.map b/program/lib/encoding/ISO-8859-1.map deleted file mode 100644 index 473ecab..0000000 --- a/program/lib/encoding/ISO-8859-1.map +++ /dev/null @@ -1,303 +0,0 @@ -# -# Name: ISO/IEC 8859-1:1998 to Unicode -# Unicode version: 3.0 -# Table version: 1.0 -# Table format: Format A -# Date: 1999 July 27 -# Authors: Ken Whistler -# -# Copyright (c) 1991-1999 Unicode, Inc. All Rights reserved. -# -# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). -# No claims are made as to fitness for any particular purpose. No -# warranties of any kind are expressed or implied. The recipient -# agrees to determine applicability of information provided. If this -# file has been provided on optical media by Unicode, Inc., the sole -# remedy for any claim will be exchange of defective media within 90 -# days of receipt. -# -# Unicode, Inc. hereby grants the right to freely use the information -# supplied in this file in the creation of products supporting the -# Unicode Standard, and to make copies of this file in any form for -# internal or external distribution as long as this notice remains -# attached. -# -# General notes: -# -# This table contains the data the Unicode Consortium has on how -# ISO/IEC 8859-1:1998 characters map into Unicode. -# -# Format: Three tab-separated columns -# Column #1 is the ISO/IEC 8859-1 code (in hex as 0xXX) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 the Unicode name (follows a comment sign, '#') -# -# The entries are in ISO/IEC 8859-1 order. -# -# Version history -# 1.0 version updates 0.1 version by adding mappings for all -# control characters. -# -# Updated versions of this file may be found in: -# -# -# Any comments or problems, contact -# Please note that is an archival address; -# notices will be checked, but do not expect an immediate response. -# -0x00 0x0000 # NULL -0x01 0x0001 # START OF HEADING -0x02 0x0002 # START OF TEXT -0x03 0x0003 # END OF TEXT -0x04 0x0004 # END OF TRANSMISSION -0x05 0x0005 # ENQUIRY -0x06 0x0006 # ACKNOWLEDGE -0x07 0x0007 # BELL -0x08 0x0008 # BACKSPACE -0x09 0x0009 # HORIZONTAL TABULATION -0x0A 0x000A # LINE FEED -0x0B 0x000B # VERTICAL TABULATION -0x0C 0x000C # FORM FEED -0x0D 0x000D # CARRIAGE RETURN -0x0E 0x000E # SHIFT OUT -0x0F 0x000F # SHIFT IN -0x10 0x0010 # DATA LINK ESCAPE -0x11 0x0011 # DEVICE CONTROL ONE -0x12 0x0012 # DEVICE CONTROL TWO -0x13 0x0013 # DEVICE CONTROL THREE -0x14 0x0014 # DEVICE CONTROL FOUR -0x15 0x0015 # NEGATIVE ACKNOWLEDGE -0x16 0x0016 # SYNCHRONOUS IDLE -0x17 0x0017 # END OF TRANSMISSION BLOCK -0x18 0x0018 # CANCEL -0x19 0x0019 # END OF MEDIUM -0x1A 0x001A # SUBSTITUTE -0x1B 0x001B # ESCAPE -0x1C 0x001C # FILE SEPARATOR -0x1D 0x001D # GROUP SEPARATOR -0x1E 0x001E # RECORD SEPARATOR -0x1F 0x001F # UNIT SEPARATOR -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # DELETE -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x00A1 # INVERTED EXCLAMATION MARK -0xA2 0x00A2 # CENT SIGN -0xA3 0x00A3 # POUND SIGN -0xA4 0x00A4 # CURRENCY SIGN -0xA5 0x00A5 # YEN SIGN -0xA6 0x00A6 # BROKEN BAR -0xA7 0x00A7 # SECTION SIGN -0xA8 0x00A8 # DIAERESIS -0xA9 0x00A9 # COPYRIGHT SIGN -0xAA 0x00AA # FEMININE ORDINAL INDICATOR -0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC # NOT SIGN -0xAD 0x00AD # SOFT HYPHEN -0xAE 0x00AE # REGISTERED SIGN -0xAF 0x00AF # MACRON -0xB0 0x00B0 # DEGREE SIGN -0xB1 0x00B1 # PLUS-MINUS SIGN -0xB2 0x00B2 # SUPERSCRIPT TWO -0xB3 0x00B3 # SUPERSCRIPT THREE -0xB4 0x00B4 # ACUTE ACCENT -0xB5 0x00B5 # MICRO SIGN -0xB6 0x00B6 # PILCROW SIGN -0xB7 0x00B7 # MIDDLE DOT -0xB8 0x00B8 # CEDILLA -0xB9 0x00B9 # SUPERSCRIPT ONE -0xBA 0x00BA # MASCULINE ORDINAL INDICATOR -0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x00BC # VULGAR FRACTION ONE QUARTER -0xBD 0x00BD # VULGAR FRACTION ONE HALF -0xBE 0x00BE # VULGAR FRACTION THREE QUARTERS -0xBF 0x00BF # INVERTED QUESTION MARK -0xC0 0x00C0 # LATIN CAPITAL LETTER A WITH GRAVE -0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC3 0x00C3 # LATIN CAPITAL LETTER A WITH TILDE -0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE -0xC6 0x00C6 # LATIN CAPITAL LETTER AE -0xC7 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA -0xC8 0x00C8 # LATIN CAPITAL LETTER E WITH GRAVE -0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX -0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x00CC # LATIN CAPITAL LETTER I WITH GRAVE -0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x00CF # LATIN CAPITAL LETTER I WITH DIAERESIS -0xD0 0x00D0 # LATIN CAPITAL LETTER ETH (Icelandic) -0xD1 0x00D1 # LATIN CAPITAL LETTER N WITH TILDE -0xD2 0x00D2 # LATIN CAPITAL LETTER O WITH GRAVE -0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX -0xD5 0x00D5 # LATIN CAPITAL LETTER O WITH TILDE -0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x00D7 # MULTIPLICATION SIGN -0xD8 0x00D8 # LATIN CAPITAL LETTER O WITH STROKE -0xD9 0x00D9 # LATIN CAPITAL LETTER U WITH GRAVE -0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX -0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x00DD # LATIN CAPITAL LETTER Y WITH ACUTE -0xDE 0x00DE # LATIN CAPITAL LETTER THORN (Icelandic) -0xDF 0x00DF # LATIN SMALL LETTER SHARP S (German) -0xE0 0x00E0 # LATIN SMALL LETTER A WITH GRAVE -0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE3 0x00E3 # LATIN SMALL LETTER A WITH TILDE -0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x00E5 # LATIN SMALL LETTER A WITH RING ABOVE -0xE6 0x00E6 # LATIN SMALL LETTER AE -0xE7 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA -0xE8 0x00E8 # LATIN SMALL LETTER E WITH GRAVE -0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE -0xEA 0x00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX -0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x00EC # LATIN SMALL LETTER I WITH GRAVE -0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x00EF # LATIN SMALL LETTER I WITH DIAERESIS -0xF0 0x00F0 # LATIN SMALL LETTER ETH (Icelandic) -0xF1 0x00F1 # LATIN SMALL LETTER N WITH TILDE -0xF2 0x00F2 # LATIN SMALL LETTER O WITH GRAVE -0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x00F5 # LATIN SMALL LETTER O WITH TILDE -0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x00F7 # DIVISION SIGN -0xF8 0x00F8 # LATIN SMALL LETTER O WITH STROKE -0xF9 0x00F9 # LATIN SMALL LETTER U WITH GRAVE -0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE -0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX -0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x00FD # LATIN SMALL LETTER Y WITH ACUTE -0xFE 0x00FE # LATIN SMALL LETTER THORN (Icelandic) -0xFF 0x00FF # LATIN SMALL LETTER Y WITH DIAERESIS diff --git a/program/lib/encoding/ISO-8859-10.map b/program/lib/encoding/ISO-8859-10.map deleted file mode 100644 index 374a42b..0000000 --- a/program/lib/encoding/ISO-8859-10.map +++ /dev/null @@ -1,303 +0,0 @@ -# -# Name: ISO/IEC 8859-10:1998 to Unicode -# Unicode version: 3.0 -# Table version: 1.1 -# Table format: Format A -# Date: 1999 October 11 -# Authors: Ken Whistler -# -# Copyright (c) 1999 Unicode, Inc. All Rights reserved. -# -# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). -# No claims are made as to fitness for any particular purpose. No -# warranties of any kind are expressed or implied. The recipient -# agrees to determine applicability of information provided. If this -# file has been provided on optical media by Unicode, Inc., the sole -# remedy for any claim will be exchange of defective media within 90 -# days of receipt. -# -# Unicode, Inc. hereby grants the right to freely use the information -# supplied in this file in the creation of products supporting the -# Unicode Standard, and to make copies of this file in any form for -# internal or external distribution as long as this notice remains -# attached. -# -# General notes: -# -# This table contains the data the Unicode Consortium has on how -# ISO/IEC 8859-10:1998 characters map into Unicode. -# -# Format: Three tab-separated columns -# Column #1 is the ISO/IEC 8859-10 code (in hex as 0xXX) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 the Unicode name (follows a comment sign, '#') -# -# The entries are in ISO/IEC 8859-10 order. -# -# Version history -# 1.0 version new. -# 1.1 corrected mistake in mapping of 0xA4 -# -# Updated versions of this file may be found in: -# -# -# Any comments or problems, contact -# Please note that is an archival address; -# notices will be checked, but do not expect an immediate response. -# -0x00 0x0000 # NULL -0x01 0x0001 # START OF HEADING -0x02 0x0002 # START OF TEXT -0x03 0x0003 # END OF TEXT -0x04 0x0004 # END OF TRANSMISSION -0x05 0x0005 # ENQUIRY -0x06 0x0006 # ACKNOWLEDGE -0x07 0x0007 # BELL -0x08 0x0008 # BACKSPACE -0x09 0x0009 # HORIZONTAL TABULATION -0x0A 0x000A # LINE FEED -0x0B 0x000B # VERTICAL TABULATION -0x0C 0x000C # FORM FEED -0x0D 0x000D # CARRIAGE RETURN -0x0E 0x000E # SHIFT OUT -0x0F 0x000F # SHIFT IN -0x10 0x0010 # DATA LINK ESCAPE -0x11 0x0011 # DEVICE CONTROL ONE -0x12 0x0012 # DEVICE CONTROL TWO -0x13 0x0013 # DEVICE CONTROL THREE -0x14 0x0014 # DEVICE CONTROL FOUR -0x15 0x0015 # NEGATIVE ACKNOWLEDGE -0x16 0x0016 # SYNCHRONOUS IDLE -0x17 0x0017 # END OF TRANSMISSION BLOCK -0x18 0x0018 # CANCEL -0x19 0x0019 # END OF MEDIUM -0x1A 0x001A # SUBSTITUTE -0x1B 0x001B # ESCAPE -0x1C 0x001C # FILE SEPARATOR -0x1D 0x001D # GROUP SEPARATOR -0x1E 0x001E # RECORD SEPARATOR -0x1F 0x001F # UNIT SEPARATOR -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # DELETE -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x0104 # LATIN CAPITAL LETTER A WITH OGONEK -0xA2 0x0112 # LATIN CAPITAL LETTER E WITH MACRON -0xA3 0x0122 # LATIN CAPITAL LETTER G WITH CEDILLA -0xA4 0x012A # LATIN CAPITAL LETTER I WITH MACRON -0xA5 0x0128 # LATIN CAPITAL LETTER I WITH TILDE -0xA6 0x0136 # LATIN CAPITAL LETTER K WITH CEDILLA -0xA7 0x00A7 # SECTION SIGN -0xA8 0x013B # LATIN CAPITAL LETTER L WITH CEDILLA -0xA9 0x0110 # LATIN CAPITAL LETTER D WITH STROKE -0xAA 0x0160 # LATIN CAPITAL LETTER S WITH CARON -0xAB 0x0166 # LATIN CAPITAL LETTER T WITH STROKE -0xAC 0x017D # LATIN CAPITAL LETTER Z WITH CARON -0xAD 0x00AD # SOFT HYPHEN -0xAE 0x016A # LATIN CAPITAL LETTER U WITH MACRON -0xAF 0x014A # LATIN CAPITAL LETTER ENG -0xB0 0x00B0 # DEGREE SIGN -0xB1 0x0105 # LATIN SMALL LETTER A WITH OGONEK -0xB2 0x0113 # LATIN SMALL LETTER E WITH MACRON -0xB3 0x0123 # LATIN SMALL LETTER G WITH CEDILLA -0xB4 0x012B # LATIN SMALL LETTER I WITH MACRON -0xB5 0x0129 # LATIN SMALL LETTER I WITH TILDE -0xB6 0x0137 # LATIN SMALL LETTER K WITH CEDILLA -0xB7 0x00B7 # MIDDLE DOT -0xB8 0x013C # LATIN SMALL LETTER L WITH CEDILLA -0xB9 0x0111 # LATIN SMALL LETTER D WITH STROKE -0xBA 0x0161 # LATIN SMALL LETTER S WITH CARON -0xBB 0x0167 # LATIN SMALL LETTER T WITH STROKE -0xBC 0x017E # LATIN SMALL LETTER Z WITH CARON -0xBD 0x2015 # HORIZONTAL BAR -0xBE 0x016B # LATIN SMALL LETTER U WITH MACRON -0xBF 0x014B # LATIN SMALL LETTER ENG -0xC0 0x0100 # LATIN CAPITAL LETTER A WITH MACRON -0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC3 0x00C3 # LATIN CAPITAL LETTER A WITH TILDE -0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE -0xC6 0x00C6 # LATIN CAPITAL LETTER AE -0xC7 0x012E # LATIN CAPITAL LETTER I WITH OGONEK -0xC8 0x010C # LATIN CAPITAL LETTER C WITH CARON -0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x0118 # LATIN CAPITAL LETTER E WITH OGONEK -0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x0116 # LATIN CAPITAL LETTER E WITH DOT ABOVE -0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x00CF # LATIN CAPITAL LETTER I WITH DIAERESIS -0xD0 0x00D0 # LATIN CAPITAL LETTER ETH (Icelandic) -0xD1 0x0145 # LATIN CAPITAL LETTER N WITH CEDILLA -0xD2 0x014C # LATIN CAPITAL LETTER O WITH MACRON -0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX -0xD5 0x00D5 # LATIN CAPITAL LETTER O WITH TILDE -0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x0168 # LATIN CAPITAL LETTER U WITH TILDE -0xD8 0x00D8 # LATIN CAPITAL LETTER O WITH STROKE -0xD9 0x0172 # LATIN CAPITAL LETTER U WITH OGONEK -0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX -0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x00DD # LATIN CAPITAL LETTER Y WITH ACUTE -0xDE 0x00DE # LATIN CAPITAL LETTER THORN (Icelandic) -0xDF 0x00DF # LATIN SMALL LETTER SHARP S (German) -0xE0 0x0101 # LATIN SMALL LETTER A WITH MACRON -0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE3 0x00E3 # LATIN SMALL LETTER A WITH TILDE -0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x00E5 # LATIN SMALL LETTER A WITH RING ABOVE -0xE6 0x00E6 # LATIN SMALL LETTER AE -0xE7 0x012F # LATIN SMALL LETTER I WITH OGONEK -0xE8 0x010D # LATIN SMALL LETTER C WITH CARON -0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE -0xEA 0x0119 # LATIN SMALL LETTER E WITH OGONEK -0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x0117 # LATIN SMALL LETTER E WITH DOT ABOVE -0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x00EF # LATIN SMALL LETTER I WITH DIAERESIS -0xF0 0x00F0 # LATIN SMALL LETTER ETH (Icelandic) -0xF1 0x0146 # LATIN SMALL LETTER N WITH CEDILLA -0xF2 0x014D # LATIN SMALL LETTER O WITH MACRON -0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x00F5 # LATIN SMALL LETTER O WITH TILDE -0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x0169 # LATIN SMALL LETTER U WITH TILDE -0xF8 0x00F8 # LATIN SMALL LETTER O WITH STROKE -0xF9 0x0173 # LATIN SMALL LETTER U WITH OGONEK -0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE -0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX -0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x00FD # LATIN SMALL LETTER Y WITH ACUTE -0xFE 0x00FE # LATIN SMALL LETTER THORN (Icelandic) -0xFF 0x0138 # LATIN SMALL LETTER KRA diff --git a/program/lib/encoding/ISO-8859-11.map b/program/lib/encoding/ISO-8859-11.map deleted file mode 100644 index 192bd9d..0000000 --- a/program/lib/encoding/ISO-8859-11.map +++ /dev/null @@ -1,297 +0,0 @@ -# -# Name: ISO/IEC 8859-11:2001 to Unicode -# Unicode version: 3.2 -# Table version: 1.0 -# Table format: Format A -# Date: 2002 October 7 -# Authors: Ken Whistler -# -# Copyright (c) 2002 Unicode, Inc. All Rights reserved. -# -# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). -# No claims are made as to fitness for any particular purpose. No -# warranties of any kind are expressed or implied. The recipient -# agrees to determine applicability of information provided. If this -# file has been provided on optical media by Unicode, Inc., the sole -# remedy for any claim will be exchange of defective media within 90 -# days of receipt. -# -# Unicode, Inc. hereby grants the right to freely use the information -# supplied in this file in the creation of products supporting the -# Unicode Standard, and to make copies of this file in any form for -# internal or external distribution as long as this notice remains -# attached. -# -# General notes: -# -# This table contains the data the Unicode Consortium has on how -# ISO/IEC 8859-11:2001 characters map into Unicode. -# -# ISO/IEC 8859-11:2001 is equivalent to TIS 620-2533 (1990) with -# the addition of 0xA0 NO-BREAK SPACE. -# -# Format: Three tab-separated columns -# Column #1 is the ISO/IEC 8859-11 code (in hex as 0xXX) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 the Unicode name (follows a comment sign, '#') -# -# The entries are in ISO/IEC 8859-11 order. -# -# Version history: -# 2002 October 7 Created -# -# Updated versions of this file may be found in: -# -# -# For any comments or problems, please use the Unicode -# web contact form at: -# http://www.unicode.org/unicode/reporting.html -# -0x00 0x0000 # NULL -0x01 0x0001 # START OF HEADING -0x02 0x0002 # START OF TEXT -0x03 0x0003 # END OF TEXT -0x04 0x0004 # END OF TRANSMISSION -0x05 0x0005 # ENQUIRY -0x06 0x0006 # ACKNOWLEDGE -0x07 0x0007 # BELL -0x08 0x0008 # BACKSPACE -0x09 0x0009 # HORIZONTAL TABULATION -0x0A 0x000A # LINE FEED -0x0B 0x000B # VERTICAL TABULATION -0x0C 0x000C # FORM FEED -0x0D 0x000D # CARRIAGE RETURN -0x0E 0x000E # SHIFT OUT -0x0F 0x000F # SHIFT IN -0x10 0x0010 # DATA LINK ESCAPE -0x11 0x0011 # DEVICE CONTROL ONE -0x12 0x0012 # DEVICE CONTROL TWO -0x13 0x0013 # DEVICE CONTROL THREE -0x14 0x0014 # DEVICE CONTROL FOUR -0x15 0x0015 # NEGATIVE ACKNOWLEDGE -0x16 0x0016 # SYNCHRONOUS IDLE -0x17 0x0017 # END OF TRANSMISSION BLOCK -0x18 0x0018 # CANCEL -0x19 0x0019 # END OF MEDIUM -0x1A 0x001A # SUBSTITUTE -0x1B 0x001B # ESCAPE -0x1C 0x001C # FILE SEPARATOR -0x1D 0x001D # GROUP SEPARATOR -0x1E 0x001E # RECORD SEPARATOR -0x1F 0x001F # UNIT SEPARATOR -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # DELETE -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x0E01 # THAI CHARACTER KO KAI -0xA2 0x0E02 # THAI CHARACTER KHO KHAI -0xA3 0x0E03 # THAI CHARACTER KHO KHUAT -0xA4 0x0E04 # THAI CHARACTER KHO KHWAI -0xA5 0x0E05 # THAI CHARACTER KHO KHON -0xA6 0x0E06 # THAI CHARACTER KHO RAKHANG -0xA7 0x0E07 # THAI CHARACTER NGO NGU -0xA8 0x0E08 # THAI CHARACTER CHO CHAN -0xA9 0x0E09 # THAI CHARACTER CHO CHING -0xAA 0x0E0A # THAI CHARACTER CHO CHANG -0xAB 0x0E0B # THAI CHARACTER SO SO -0xAC 0x0E0C # THAI CHARACTER CHO CHOE -0xAD 0x0E0D # THAI CHARACTER YO YING -0xAE 0x0E0E # THAI CHARACTER DO CHADA -0xAF 0x0E0F # THAI CHARACTER TO PATAK -0xB0 0x0E10 # THAI CHARACTER THO THAN -0xB1 0x0E11 # THAI CHARACTER THO NANGMONTHO -0xB2 0x0E12 # THAI CHARACTER THO PHUTHAO -0xB3 0x0E13 # THAI CHARACTER NO NEN -0xB4 0x0E14 # THAI CHARACTER DO DEK -0xB5 0x0E15 # THAI CHARACTER TO TAO -0xB6 0x0E16 # THAI CHARACTER THO THUNG -0xB7 0x0E17 # THAI CHARACTER THO THAHAN -0xB8 0x0E18 # THAI CHARACTER THO THONG -0xB9 0x0E19 # THAI CHARACTER NO NU -0xBA 0x0E1A # THAI CHARACTER BO BAIMAI -0xBB 0x0E1B # THAI CHARACTER PO PLA -0xBC 0x0E1C # THAI CHARACTER PHO PHUNG -0xBD 0x0E1D # THAI CHARACTER FO FA -0xBE 0x0E1E # THAI CHARACTER PHO PHAN -0xBF 0x0E1F # THAI CHARACTER FO FAN -0xC0 0x0E20 # THAI CHARACTER PHO SAMPHAO -0xC1 0x0E21 # THAI CHARACTER MO MA -0xC2 0x0E22 # THAI CHARACTER YO YAK -0xC3 0x0E23 # THAI CHARACTER RO RUA -0xC4 0x0E24 # THAI CHARACTER RU -0xC5 0x0E25 # THAI CHARACTER LO LING -0xC6 0x0E26 # THAI CHARACTER LU -0xC7 0x0E27 # THAI CHARACTER WO WAEN -0xC8 0x0E28 # THAI CHARACTER SO SALA -0xC9 0x0E29 # THAI CHARACTER SO RUSI -0xCA 0x0E2A # THAI CHARACTER SO SUA -0xCB 0x0E2B # THAI CHARACTER HO HIP -0xCC 0x0E2C # THAI CHARACTER LO CHULA -0xCD 0x0E2D # THAI CHARACTER O ANG -0xCE 0x0E2E # THAI CHARACTER HO NOKHUK -0xCF 0x0E2F # THAI CHARACTER PAIYANNOI -0xD0 0x0E30 # THAI CHARACTER SARA A -0xD1 0x0E31 # THAI CHARACTER MAI HAN-AKAT -0xD2 0x0E32 # THAI CHARACTER SARA AA -0xD3 0x0E33 # THAI CHARACTER SARA AM -0xD4 0x0E34 # THAI CHARACTER SARA I -0xD5 0x0E35 # THAI CHARACTER SARA II -0xD6 0x0E36 # THAI CHARACTER SARA UE -0xD7 0x0E37 # THAI CHARACTER SARA UEE -0xD8 0x0E38 # THAI CHARACTER SARA U -0xD9 0x0E39 # THAI CHARACTER SARA UU -0xDA 0x0E3A # THAI CHARACTER PHINTHU -0xDF 0x0E3F # THAI CURRENCY SYMBOL BAHT -0xE0 0x0E40 # THAI CHARACTER SARA E -0xE1 0x0E41 # THAI CHARACTER SARA AE -0xE2 0x0E42 # THAI CHARACTER SARA O -0xE3 0x0E43 # THAI CHARACTER SARA AI MAIMUAN -0xE4 0x0E44 # THAI CHARACTER SARA AI MAIMALAI -0xE5 0x0E45 # THAI CHARACTER LAKKHANGYAO -0xE6 0x0E46 # THAI CHARACTER MAIYAMOK -0xE7 0x0E47 # THAI CHARACTER MAITAIKHU -0xE8 0x0E48 # THAI CHARACTER MAI EK -0xE9 0x0E49 # THAI CHARACTER MAI THO -0xEA 0x0E4A # THAI CHARACTER MAI TRI -0xEB 0x0E4B # THAI CHARACTER MAI CHATTAWA -0xEC 0x0E4C # THAI CHARACTER THANTHAKHAT -0xED 0x0E4D # THAI CHARACTER NIKHAHIT -0xEE 0x0E4E # THAI CHARACTER YAMAKKAN -0xEF 0x0E4F # THAI CHARACTER FONGMAN -0xF0 0x0E50 # THAI DIGIT ZERO -0xF1 0x0E51 # THAI DIGIT ONE -0xF2 0x0E52 # THAI DIGIT TWO -0xF3 0x0E53 # THAI DIGIT THREE -0xF4 0x0E54 # THAI DIGIT FOUR -0xF5 0x0E55 # THAI DIGIT FIVE -0xF6 0x0E56 # THAI DIGIT SIX -0xF7 0x0E57 # THAI DIGIT SEVEN -0xF8 0x0E58 # THAI DIGIT EIGHT -0xF9 0x0E59 # THAI DIGIT NINE -0xFA 0x0E5A # THAI CHARACTER ANGKHANKHU -0xFB 0x0E5B # THAI CHARACTER KHOMUT diff --git a/program/lib/encoding/ISO-8859-13.map b/program/lib/encoding/ISO-8859-13.map deleted file mode 100644 index cd11b53..0000000 --- a/program/lib/encoding/ISO-8859-13.map +++ /dev/null @@ -1,299 +0,0 @@ -# -# Name: ISO/IEC 8859-13:1998 to Unicode -# Unicode version: 3.0 -# Table version: 1.0 -# Table format: Format A -# Date: 1999 July 27 -# Authors: Ken Whistler -# -# Copyright (c) 1998 - 1999 Unicode, Inc. All Rights reserved. -# -# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). -# No claims are made as to fitness for any particular purpose. No -# warranties of any kind are expressed or implied. The recipient -# agrees to determine applicability of information provided. If this -# file has been provided on optical media by Unicode, Inc., the sole -# remedy for any claim will be exchange of defective media within 90 -# days of receipt. -# -# Unicode, Inc. hereby grants the right to freely use the information -# supplied in this file in the creation of products supporting the -# Unicode Standard, and to make copies of this file in any form for -# internal or external distribution as long as this notice remains -# attached. -# -# General notes: -# -# This table contains the data the Unicode Consortium has on how -# ISO/IEC 8859-13:1998 characters map into Unicode. -# -# Format: Three tab-separated columns -# Column #1 is the ISO/IEC 8859-13 code (in hex as 0xXX) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 the Unicode name (follows a comment sign, '#') -# -# The entries are in ISO/IEC 8859-13 order. -# -# Updated versions of this file may be found in: -# -# -# Any comments or problems, contact -# Please note that is an archival address; -# notices will be checked, but do not expect an immediate response. -# -0x00 0x0000 # NULL -0x01 0x0001 # START OF HEADING -0x02 0x0002 # START OF TEXT -0x03 0x0003 # END OF TEXT -0x04 0x0004 # END OF TRANSMISSION -0x05 0x0005 # ENQUIRY -0x06 0x0006 # ACKNOWLEDGE -0x07 0x0007 # BELL -0x08 0x0008 # BACKSPACE -0x09 0x0009 # HORIZONTAL TABULATION -0x0A 0x000A # LINE FEED -0x0B 0x000B # VERTICAL TABULATION -0x0C 0x000C # FORM FEED -0x0D 0x000D # CARRIAGE RETURN -0x0E 0x000E # SHIFT OUT -0x0F 0x000F # SHIFT IN -0x10 0x0010 # DATA LINK ESCAPE -0x11 0x0011 # DEVICE CONTROL ONE -0x12 0x0012 # DEVICE CONTROL TWO -0x13 0x0013 # DEVICE CONTROL THREE -0x14 0x0014 # DEVICE CONTROL FOUR -0x15 0x0015 # NEGATIVE ACKNOWLEDGE -0x16 0x0016 # SYNCHRONOUS IDLE -0x17 0x0017 # END OF TRANSMISSION BLOCK -0x18 0x0018 # CANCEL -0x19 0x0019 # END OF MEDIUM -0x1A 0x001A # SUBSTITUTE -0x1B 0x001B # ESCAPE -0x1C 0x001C # FILE SEPARATOR -0x1D 0x001D # GROUP SEPARATOR -0x1E 0x001E # RECORD SEPARATOR -0x1F 0x001F # UNIT SEPARATOR -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # DELETE -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x201D # RIGHT DOUBLE QUOTATION MARK -0xA2 0x00A2 # CENT SIGN -0xA3 0x00A3 # POUND SIGN -0xA4 0x00A4 # CURRENCY SIGN -0xA5 0x201E # DOUBLE LOW-9 QUOTATION MARK -0xA6 0x00A6 # BROKEN BAR -0xA7 0x00A7 # SECTION SIGN -0xA8 0x00D8 # LATIN CAPITAL LETTER O WITH STROKE -0xA9 0x00A9 # COPYRIGHT SIGN -0xAA 0x0156 # LATIN CAPITAL LETTER R WITH CEDILLA -0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC # NOT SIGN -0xAD 0x00AD # SOFT HYPHEN -0xAE 0x00AE # REGISTERED SIGN -0xAF 0x00C6 # LATIN CAPITAL LETTER AE -0xB0 0x00B0 # DEGREE SIGN -0xB1 0x00B1 # PLUS-MINUS SIGN -0xB2 0x00B2 # SUPERSCRIPT TWO -0xB3 0x00B3 # SUPERSCRIPT THREE -0xB4 0x201C # LEFT DOUBLE QUOTATION MARK -0xB5 0x00B5 # MICRO SIGN -0xB6 0x00B6 # PILCROW SIGN -0xB7 0x00B7 # MIDDLE DOT -0xB8 0x00F8 # LATIN SMALL LETTER O WITH STROKE -0xB9 0x00B9 # SUPERSCRIPT ONE -0xBA 0x0157 # LATIN SMALL LETTER R WITH CEDILLA -0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x00BC # VULGAR FRACTION ONE QUARTER -0xBD 0x00BD # VULGAR FRACTION ONE HALF -0xBE 0x00BE # VULGAR FRACTION THREE QUARTERS -0xBF 0x00E6 # LATIN SMALL LETTER AE -0xC0 0x0104 # LATIN CAPITAL LETTER A WITH OGONEK -0xC1 0x012E # LATIN CAPITAL LETTER I WITH OGONEK -0xC2 0x0100 # LATIN CAPITAL LETTER A WITH MACRON -0xC3 0x0106 # LATIN CAPITAL LETTER C WITH ACUTE -0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE -0xC6 0x0118 # LATIN CAPITAL LETTER E WITH OGONEK -0xC7 0x0112 # LATIN CAPITAL LETTER E WITH MACRON -0xC8 0x010C # LATIN CAPITAL LETTER C WITH CARON -0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x0179 # LATIN CAPITAL LETTER Z WITH ACUTE -0xCB 0x0116 # LATIN CAPITAL LETTER E WITH DOT ABOVE -0xCC 0x0122 # LATIN CAPITAL LETTER G WITH CEDILLA -0xCD 0x0136 # LATIN CAPITAL LETTER K WITH CEDILLA -0xCE 0x012A # LATIN CAPITAL LETTER I WITH MACRON -0xCF 0x013B # LATIN CAPITAL LETTER L WITH CEDILLA -0xD0 0x0160 # LATIN CAPITAL LETTER S WITH CARON -0xD1 0x0143 # LATIN CAPITAL LETTER N WITH ACUTE -0xD2 0x0145 # LATIN CAPITAL LETTER N WITH CEDILLA -0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x014C # LATIN CAPITAL LETTER O WITH MACRON -0xD5 0x00D5 # LATIN CAPITAL LETTER O WITH TILDE -0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x00D7 # MULTIPLICATION SIGN -0xD8 0x0172 # LATIN CAPITAL LETTER U WITH OGONEK -0xD9 0x0141 # LATIN CAPITAL LETTER L WITH STROKE -0xDA 0x015A # LATIN CAPITAL LETTER S WITH ACUTE -0xDB 0x016A # LATIN CAPITAL LETTER U WITH MACRON -0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x017B # LATIN CAPITAL LETTER Z WITH DOT ABOVE -0xDE 0x017D # LATIN CAPITAL LETTER Z WITH CARON -0xDF 0x00DF # LATIN SMALL LETTER SHARP S (German) -0xE0 0x0105 # LATIN SMALL LETTER A WITH OGONEK -0xE1 0x012F # LATIN SMALL LETTER I WITH OGONEK -0xE2 0x0101 # LATIN SMALL LETTER A WITH MACRON -0xE3 0x0107 # LATIN SMALL LETTER C WITH ACUTE -0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x00E5 # LATIN SMALL LETTER A WITH RING ABOVE -0xE6 0x0119 # LATIN SMALL LETTER E WITH OGONEK -0xE7 0x0113 # LATIN SMALL LETTER E WITH MACRON -0xE8 0x010D # LATIN SMALL LETTER C WITH CARON -0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE -0xEA 0x017A # LATIN SMALL LETTER Z WITH ACUTE -0xEB 0x0117 # LATIN SMALL LETTER E WITH DOT ABOVE -0xEC 0x0123 # LATIN SMALL LETTER G WITH CEDILLA -0xED 0x0137 # LATIN SMALL LETTER K WITH CEDILLA -0xEE 0x012B # LATIN SMALL LETTER I WITH MACRON -0xEF 0x013C # LATIN SMALL LETTER L WITH CEDILLA -0xF0 0x0161 # LATIN SMALL LETTER S WITH CARON -0xF1 0x0144 # LATIN SMALL LETTER N WITH ACUTE -0xF2 0x0146 # LATIN SMALL LETTER N WITH CEDILLA -0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE -0xF4 0x014D # LATIN SMALL LETTER O WITH MACRON -0xF5 0x00F5 # LATIN SMALL LETTER O WITH TILDE -0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x00F7 # DIVISION SIGN -0xF8 0x0173 # LATIN SMALL LETTER U WITH OGONEK -0xF9 0x0142 # LATIN SMALL LETTER L WITH STROKE -0xFA 0x015B # LATIN SMALL LETTER S WITH ACUTE -0xFB 0x016B # LATIN SMALL LETTER U WITH MACRON -0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x017C # LATIN SMALL LETTER Z WITH DOT ABOVE -0xFE 0x017E # LATIN SMALL LETTER Z WITH CARON -0xFF 0x2019 # RIGHT SINGLE QUOTATION MARK diff --git a/program/lib/encoding/ISO-8859-14.map b/program/lib/encoding/ISO-8859-14.map deleted file mode 100644 index 73e9855..0000000 --- a/program/lib/encoding/ISO-8859-14.map +++ /dev/null @@ -1,301 +0,0 @@ -# -# Name: ISO/IEC 8859-14:1998 to Unicode -# Unicode version: 3.0 -# Table version: 1.0 -# Table format: Format A -# Date: 1999 July 27 -# Authors: Markus Kuhn -# Ken Whistler -# -# Copyright (c) 1998 - 1999 Unicode, Inc. All Rights reserved. -# -# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). -# No claims are made as to fitness for any particular purpose. No -# warranties of any kind are expressed or implied. The recipient -# agrees to determine applicability of information provided. If this -# file has been provided on optical media by Unicode, Inc., the sole -# remedy for any claim will be exchange of defective media within 90 -# days of receipt. -# -# Unicode, Inc. hereby grants the right to freely use the information -# supplied in this file in the creation of products supporting the -# Unicode Standard, and to make copies of this file in any form for -# internal or external distribution as long as this notice remains -# attached. -# -# General notes: -# -# This table contains the data the Unicode Consortium has on how -# ISO/IEC 8859-14:1998 characters map into Unicode. -# -# Format: Three tab-separated columns -# Column #1 is the ISO/IEC 8859-14 code (in hex as 0xXX) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 the Unicode name (follows a comment sign, '#') -# -# The entries are in ISO/IEC 8859-14 order. -# -# Updated versions of this file may be found in: -# -# -# Any comments or problems, contact -# Please note that is an archival address; -# notices will be checked, but do not expect an immediate response. -# -0x00 0x0000 # NULL -0x01 0x0001 # START OF HEADING -0x02 0x0002 # START OF TEXT -0x03 0x0003 # END OF TEXT -0x04 0x0004 # END OF TRANSMISSION -0x05 0x0005 # ENQUIRY -0x06 0x0006 # ACKNOWLEDGE -0x07 0x0007 # BELL -0x08 0x0008 # BACKSPACE -0x09 0x0009 # HORIZONTAL TABULATION -0x0A 0x000A # LINE FEED -0x0B 0x000B # VERTICAL TABULATION -0x0C 0x000C # FORM FEED -0x0D 0x000D # CARRIAGE RETURN -0x0E 0x000E # SHIFT OUT -0x0F 0x000F # SHIFT IN -0x10 0x0010 # DATA LINK ESCAPE -0x11 0x0011 # DEVICE CONTROL ONE -0x12 0x0012 # DEVICE CONTROL TWO -0x13 0x0013 # DEVICE CONTROL THREE -0x14 0x0014 # DEVICE CONTROL FOUR -0x15 0x0015 # NEGATIVE ACKNOWLEDGE -0x16 0x0016 # SYNCHRONOUS IDLE -0x17 0x0017 # END OF TRANSMISSION BLOCK -0x18 0x0018 # CANCEL -0x19 0x0019 # END OF MEDIUM -0x1A 0x001A # SUBSTITUTE -0x1B 0x001B # ESCAPE -0x1C 0x001C # FILE SEPARATOR -0x1D 0x001D # GROUP SEPARATOR -0x1E 0x001E # RECORD SEPARATOR -0x1F 0x001F # UNIT SEPARATOR -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # DELETE -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x1E02 # LATIN CAPITAL LETTER B WITH DOT ABOVE -0xA2 0x1E03 # LATIN SMALL LETTER B WITH DOT ABOVE -0xA3 0x00A3 # POUND SIGN -0xA4 0x010A # LATIN CAPITAL LETTER C WITH DOT ABOVE -0xA5 0x010B # LATIN SMALL LETTER C WITH DOT ABOVE -0xA6 0x1E0A # LATIN CAPITAL LETTER D WITH DOT ABOVE -0xA7 0x00A7 # SECTION SIGN -0xA8 0x1E80 # LATIN CAPITAL LETTER W WITH GRAVE -0xA9 0x00A9 # COPYRIGHT SIGN -0xAA 0x1E82 # LATIN CAPITAL LETTER W WITH ACUTE -0xAB 0x1E0B # LATIN SMALL LETTER D WITH DOT ABOVE -0xAC 0x1EF2 # LATIN CAPITAL LETTER Y WITH GRAVE -0xAD 0x00AD # SOFT HYPHEN -0xAE 0x00AE # REGISTERED SIGN -0xAF 0x0178 # LATIN CAPITAL LETTER Y WITH DIAERESIS -0xB0 0x1E1E # LATIN CAPITAL LETTER F WITH DOT ABOVE -0xB1 0x1E1F # LATIN SMALL LETTER F WITH DOT ABOVE -0xB2 0x0120 # LATIN CAPITAL LETTER G WITH DOT ABOVE -0xB3 0x0121 # LATIN SMALL LETTER G WITH DOT ABOVE -0xB4 0x1E40 # LATIN CAPITAL LETTER M WITH DOT ABOVE -0xB5 0x1E41 # LATIN SMALL LETTER M WITH DOT ABOVE -0xB6 0x00B6 # PILCROW SIGN -0xB7 0x1E56 # LATIN CAPITAL LETTER P WITH DOT ABOVE -0xB8 0x1E81 # LATIN SMALL LETTER W WITH GRAVE -0xB9 0x1E57 # LATIN SMALL LETTER P WITH DOT ABOVE -0xBA 0x1E83 # LATIN SMALL LETTER W WITH ACUTE -0xBB 0x1E60 # LATIN CAPITAL LETTER S WITH DOT ABOVE -0xBC 0x1EF3 # LATIN SMALL LETTER Y WITH GRAVE -0xBD 0x1E84 # LATIN CAPITAL LETTER W WITH DIAERESIS -0xBE 0x1E85 # LATIN SMALL LETTER W WITH DIAERESIS -0xBF 0x1E61 # LATIN SMALL LETTER S WITH DOT ABOVE -0xC0 0x00C0 # LATIN CAPITAL LETTER A WITH GRAVE -0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC3 0x00C3 # LATIN CAPITAL LETTER A WITH TILDE -0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE -0xC6 0x00C6 # LATIN CAPITAL LETTER AE -0xC7 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA -0xC8 0x00C8 # LATIN CAPITAL LETTER E WITH GRAVE -0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX -0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x00CC # LATIN CAPITAL LETTER I WITH GRAVE -0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x00CF # LATIN CAPITAL LETTER I WITH DIAERESIS -0xD0 0x0174 # LATIN CAPITAL LETTER W WITH CIRCUMFLEX -0xD1 0x00D1 # LATIN CAPITAL LETTER N WITH TILDE -0xD2 0x00D2 # LATIN CAPITAL LETTER O WITH GRAVE -0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX -0xD5 0x00D5 # LATIN CAPITAL LETTER O WITH TILDE -0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x1E6A # LATIN CAPITAL LETTER T WITH DOT ABOVE -0xD8 0x00D8 # LATIN CAPITAL LETTER O WITH STROKE -0xD9 0x00D9 # LATIN CAPITAL LETTER U WITH GRAVE -0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX -0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x00DD # LATIN CAPITAL LETTER Y WITH ACUTE -0xDE 0x0176 # LATIN CAPITAL LETTER Y WITH CIRCUMFLEX -0xDF 0x00DF # LATIN SMALL LETTER SHARP S -0xE0 0x00E0 # LATIN SMALL LETTER A WITH GRAVE -0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE3 0x00E3 # LATIN SMALL LETTER A WITH TILDE -0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x00E5 # LATIN SMALL LETTER A WITH RING ABOVE -0xE6 0x00E6 # LATIN SMALL LETTER AE -0xE7 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA -0xE8 0x00E8 # LATIN SMALL LETTER E WITH GRAVE -0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE -0xEA 0x00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX -0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x00EC # LATIN SMALL LETTER I WITH GRAVE -0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x00EF # LATIN SMALL LETTER I WITH DIAERESIS -0xF0 0x0175 # LATIN SMALL LETTER W WITH CIRCUMFLEX -0xF1 0x00F1 # LATIN SMALL LETTER N WITH TILDE -0xF2 0x00F2 # LATIN SMALL LETTER O WITH GRAVE -0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x00F5 # LATIN SMALL LETTER O WITH TILDE -0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x1E6B # LATIN SMALL LETTER T WITH DOT ABOVE -0xF8 0x00F8 # LATIN SMALL LETTER O WITH STROKE -0xF9 0x00F9 # LATIN SMALL LETTER U WITH GRAVE -0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE -0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX -0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x00FD # LATIN SMALL LETTER Y WITH ACUTE -0xFE 0x0177 # LATIN SMALL LETTER Y WITH CIRCUMFLEX -0xFF 0x00FF # LATIN SMALL LETTER Y WITH DIAERESIS - diff --git a/program/lib/encoding/ISO-8859-15.map b/program/lib/encoding/ISO-8859-15.map deleted file mode 100644 index ab2f32f..0000000 --- a/program/lib/encoding/ISO-8859-15.map +++ /dev/null @@ -1,303 +0,0 @@ -# -# Name: ISO/IEC 8859-15:1999 to Unicode -# Unicode version: 3.0 -# Table version: 1.0 -# Table format: Format A -# Date: 1999 July 27 -# Authors: Markus Kuhn -# Ken Whistler -# -# Copyright (c) 1998 - 1999 Unicode, Inc. All Rights reserved. -# -# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). -# No claims are made as to fitness for any particular purpose. No -# warranties of any kind are expressed or implied. The recipient -# agrees to determine applicability of information provided. If this -# file has been provided on optical media by Unicode, Inc., the sole -# remedy for any claim will be exchange of defective media within 90 -# days of receipt. -# -# Unicode, Inc. hereby grants the right to freely use the information -# supplied in this file in the creation of products supporting the -# Unicode Standard, and to make copies of this file in any form for -# internal or external distribution as long as this notice remains -# attached. -# -# General notes: -# -# This table contains the data the Unicode Consortium has on how -# ISO/IEC 8859-15:1999 characters map into Unicode. -# -# Format: Three tab-separated columns -# Column #1 is the ISO/IEC 8859-15 code (in hex as 0xXX) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 the Unicode name (follows a comment sign, '#') -# -# The entries are in ISO/IEC 8859-15 order. -# -# Version history -# -# Updated versions of this file may be found in: -# -# -# Any comments or problems, contact -# Please note that is an archival address; -# notices will be checked, but do not expect an immediate response. -# -0x00 0x0000 # NULL -0x01 0x0001 # START OF HEADING -0x02 0x0002 # START OF TEXT -0x03 0x0003 # END OF TEXT -0x04 0x0004 # END OF TRANSMISSION -0x05 0x0005 # ENQUIRY -0x06 0x0006 # ACKNOWLEDGE -0x07 0x0007 # BELL -0x08 0x0008 # BACKSPACE -0x09 0x0009 # HORIZONTAL TABULATION -0x0A 0x000A # LINE FEED -0x0B 0x000B # VERTICAL TABULATION -0x0C 0x000C # FORM FEED -0x0D 0x000D # CARRIAGE RETURN -0x0E 0x000E # SHIFT OUT -0x0F 0x000F # SHIFT IN -0x10 0x0010 # DATA LINK ESCAPE -0x11 0x0011 # DEVICE CONTROL ONE -0x12 0x0012 # DEVICE CONTROL TWO -0x13 0x0013 # DEVICE CONTROL THREE -0x14 0x0014 # DEVICE CONTROL FOUR -0x15 0x0015 # NEGATIVE ACKNOWLEDGE -0x16 0x0016 # SYNCHRONOUS IDLE -0x17 0x0017 # END OF TRANSMISSION BLOCK -0x18 0x0018 # CANCEL -0x19 0x0019 # END OF MEDIUM -0x1A 0x001A # SUBSTITUTE -0x1B 0x001B # ESCAPE -0x1C 0x001C # FILE SEPARATOR -0x1D 0x001D # GROUP SEPARATOR -0x1E 0x001E # RECORD SEPARATOR -0x1F 0x001F # UNIT SEPARATOR -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # DELETE -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x00A1 # INVERTED EXCLAMATION MARK -0xA2 0x00A2 # CENT SIGN -0xA3 0x00A3 # POUND SIGN -0xA4 0x20AC # EURO SIGN -0xA5 0x00A5 # YEN SIGN -0xA6 0x0160 # LATIN CAPITAL LETTER S WITH CARON -0xA7 0x00A7 # SECTION SIGN -0xA8 0x0161 # LATIN SMALL LETTER S WITH CARON -0xA9 0x00A9 # COPYRIGHT SIGN -0xAA 0x00AA # FEMININE ORDINAL INDICATOR -0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC # NOT SIGN -0xAD 0x00AD # SOFT HYPHEN -0xAE 0x00AE # REGISTERED SIGN -0xAF 0x00AF # MACRON -0xB0 0x00B0 # DEGREE SIGN -0xB1 0x00B1 # PLUS-MINUS SIGN -0xB2 0x00B2 # SUPERSCRIPT TWO -0xB3 0x00B3 # SUPERSCRIPT THREE -0xB4 0x017D # LATIN CAPITAL LETTER Z WITH CARON -0xB5 0x00B5 # MICRO SIGN -0xB6 0x00B6 # PILCROW SIGN -0xB7 0x00B7 # MIDDLE DOT -0xB8 0x017E # LATIN SMALL LETTER Z WITH CARON -0xB9 0x00B9 # SUPERSCRIPT ONE -0xBA 0x00BA # MASCULINE ORDINAL INDICATOR -0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x0152 # LATIN CAPITAL LIGATURE OE -0xBD 0x0153 # LATIN SMALL LIGATURE OE -0xBE 0x0178 # LATIN CAPITAL LETTER Y WITH DIAERESIS -0xBF 0x00BF # INVERTED QUESTION MARK -0xC0 0x00C0 # LATIN CAPITAL LETTER A WITH GRAVE -0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC3 0x00C3 # LATIN CAPITAL LETTER A WITH TILDE -0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE -0xC6 0x00C6 # LATIN CAPITAL LETTER AE -0xC7 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA -0xC8 0x00C8 # LATIN CAPITAL LETTER E WITH GRAVE -0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX -0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x00CC # LATIN CAPITAL LETTER I WITH GRAVE -0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x00CF # LATIN CAPITAL LETTER I WITH DIAERESIS -0xD0 0x00D0 # LATIN CAPITAL LETTER ETH -0xD1 0x00D1 # LATIN CAPITAL LETTER N WITH TILDE -0xD2 0x00D2 # LATIN CAPITAL LETTER O WITH GRAVE -0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX -0xD5 0x00D5 # LATIN CAPITAL LETTER O WITH TILDE -0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x00D7 # MULTIPLICATION SIGN -0xD8 0x00D8 # LATIN CAPITAL LETTER O WITH STROKE -0xD9 0x00D9 # LATIN CAPITAL LETTER U WITH GRAVE -0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX -0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x00DD # LATIN CAPITAL LETTER Y WITH ACUTE -0xDE 0x00DE # LATIN CAPITAL LETTER THORN -0xDF 0x00DF # LATIN SMALL LETTER SHARP S -0xE0 0x00E0 # LATIN SMALL LETTER A WITH GRAVE -0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE3 0x00E3 # LATIN SMALL LETTER A WITH TILDE -0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x00E5 # LATIN SMALL LETTER A WITH RING ABOVE -0xE6 0x00E6 # LATIN SMALL LETTER AE -0xE7 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA -0xE8 0x00E8 # LATIN SMALL LETTER E WITH GRAVE -0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE -0xEA 0x00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX -0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x00EC # LATIN SMALL LETTER I WITH GRAVE -0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x00EF # LATIN SMALL LETTER I WITH DIAERESIS -0xF0 0x00F0 # LATIN SMALL LETTER ETH -0xF1 0x00F1 # LATIN SMALL LETTER N WITH TILDE -0xF2 0x00F2 # LATIN SMALL LETTER O WITH GRAVE -0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x00F5 # LATIN SMALL LETTER O WITH TILDE -0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x00F7 # DIVISION SIGN -0xF8 0x00F8 # LATIN SMALL LETTER O WITH STROKE -0xF9 0x00F9 # LATIN SMALL LETTER U WITH GRAVE -0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE -0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX -0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x00FD # LATIN SMALL LETTER Y WITH ACUTE -0xFE 0x00FE # LATIN SMALL LETTER THORN -0xFF 0x00FF # LATIN SMALL LETTER Y WITH DIAERESIS - diff --git a/program/lib/encoding/ISO-8859-16.map b/program/lib/encoding/ISO-8859-16.map deleted file mode 100644 index c0dcf0d..0000000 --- a/program/lib/encoding/ISO-8859-16.map +++ /dev/null @@ -1,299 +0,0 @@ -# -# Name: ISO/IEC 8859-16:2001 to Unicode -# Unicode version: 3.0 -# Table version: 1.0 -# Table format: Format A -# Date: 2001 July 26 -# Authors: Markus Kuhn -# -# Copyright (c) 1999-2001 Unicode, Inc. All Rights reserved. -# -# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). -# No claims are made as to fitness for any particular purpose. No -# warranties of any kind are expressed or implied. The recipient -# agrees to determine applicability of information provided. If this -# file has been provided on optical media by Unicode, Inc., the sole -# remedy for any claim will be exchange of defective media within 90 -# days of receipt. -# -# Unicode, Inc. hereby grants the right to freely use the information -# supplied in this file in the creation of products supporting the -# Unicode Standard, and to make copies of this file in any form for -# internal or external distribution as long as this notice remains -# attached. -# -# General notes: -# -# This table contains the data the Unicode Consortium has on how -# ISO/IEC 8859-16:2001 characters map into Unicode. -# -# Format: Three tab-separated columns -# Column #1 is the ISO/IEC 8859-16 code (in hex as 0xXX) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 the Unicode name (follows a comment sign, '#') -# -# The entries are in ISO/IEC 8859-16 order. -# -# Updated versions of this file may be found in: -# -# -# Any comments or problems, contact -# Please note that is an archival address; -# notices will be checked, but do not expect an immediate response. -# -0x00 0x0000 # NULL -0x01 0x0001 # START OF HEADING -0x02 0x0002 # START OF TEXT -0x03 0x0003 # END OF TEXT -0x04 0x0004 # END OF TRANSMISSION -0x05 0x0005 # ENQUIRY -0x06 0x0006 # ACKNOWLEDGE -0x07 0x0007 # BELL -0x08 0x0008 # BACKSPACE -0x09 0x0009 # HORIZONTAL TABULATION -0x0A 0x000A # LINE FEED -0x0B 0x000B # VERTICAL TABULATION -0x0C 0x000C # FORM FEED -0x0D 0x000D # CARRIAGE RETURN -0x0E 0x000E # SHIFT OUT -0x0F 0x000F # SHIFT IN -0x10 0x0010 # DATA LINK ESCAPE -0x11 0x0011 # DEVICE CONTROL ONE -0x12 0x0012 # DEVICE CONTROL TWO -0x13 0x0013 # DEVICE CONTROL THREE -0x14 0x0014 # DEVICE CONTROL FOUR -0x15 0x0015 # NEGATIVE ACKNOWLEDGE -0x16 0x0016 # SYNCHRONOUS IDLE -0x17 0x0017 # END OF TRANSMISSION BLOCK -0x18 0x0018 # CANCEL -0x19 0x0019 # END OF MEDIUM -0x1A 0x001A # SUBSTITUTE -0x1B 0x001B # ESCAPE -0x1C 0x001C # FILE SEPARATOR -0x1D 0x001D # GROUP SEPARATOR -0x1E 0x001E # RECORD SEPARATOR -0x1F 0x001F # UNIT SEPARATOR -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # DELETE -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x0104 # LATIN CAPITAL LETTER A WITH OGONEK -0xA2 0x0105 # LATIN SMALL LETTER A WITH OGONEK -0xA3 0x0141 # LATIN CAPITAL LETTER L WITH STROKE -0xA4 0x20AC # EURO SIGN -0xA5 0x201E # DOUBLE LOW-9 QUOTATION MARK -0xA6 0x0160 # LATIN CAPITAL LETTER S WITH CARON -0xA7 0x00A7 # SECTION SIGN -0xA8 0x0161 # LATIN SMALL LETTER S WITH CARON -0xA9 0x00A9 # COPYRIGHT SIGN -0xAA 0x0218 # LATIN CAPITAL LETTER S WITH COMMA BELOW -0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x0179 # LATIN CAPITAL LETTER Z WITH ACUTE -0xAD 0x00AD # SOFT HYPHEN -0xAE 0x017A # LATIN SMALL LETTER Z WITH ACUTE -0xAF 0x017B # LATIN CAPITAL LETTER Z WITH DOT ABOVE -0xB0 0x00B0 # DEGREE SIGN -0xB1 0x00B1 # PLUS-MINUS SIGN -0xB2 0x010C # LATIN CAPITAL LETTER C WITH CARON -0xB3 0x0142 # LATIN SMALL LETTER L WITH STROKE -0xB4 0x017D # LATIN CAPITAL LETTER Z WITH CARON -0xB5 0x201D # RIGHT DOUBLE QUOTATION MARK -0xB6 0x00B6 # PILCROW SIGN -0xB7 0x00B7 # MIDDLE DOT -0xB8 0x017E # LATIN SMALL LETTER Z WITH CARON -0xB9 0x010D # LATIN SMALL LETTER C WITH CARON -0xBA 0x0219 # LATIN SMALL LETTER S WITH COMMA BELOW -0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x0152 # LATIN CAPITAL LIGATURE OE -0xBD 0x0153 # LATIN SMALL LIGATURE OE -0xBE 0x0178 # LATIN CAPITAL LETTER Y WITH DIAERESIS -0xBF 0x017C # LATIN SMALL LETTER Z WITH DOT ABOVE -0xC0 0x00C0 # LATIN CAPITAL LETTER A WITH GRAVE -0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC3 0x0102 # LATIN CAPITAL LETTER A WITH BREVE -0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x0106 # LATIN CAPITAL LETTER C WITH ACUTE -0xC6 0x00C6 # LATIN CAPITAL LETTER AE -0xC7 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA -0xC8 0x00C8 # LATIN CAPITAL LETTER E WITH GRAVE -0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX -0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x00CC # LATIN CAPITAL LETTER I WITH GRAVE -0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x00CF # LATIN CAPITAL LETTER I WITH DIAERESIS -0xD0 0x0110 # LATIN CAPITAL LETTER D WITH STROKE -0xD1 0x0143 # LATIN CAPITAL LETTER N WITH ACUTE -0xD2 0x00D2 # LATIN CAPITAL LETTER O WITH GRAVE -0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX -0xD5 0x0150 # LATIN CAPITAL LETTER O WITH DOUBLE ACUTE -0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x015A # LATIN CAPITAL LETTER S WITH ACUTE -0xD8 0x0170 # LATIN CAPITAL LETTER U WITH DOUBLE ACUTE -0xD9 0x00D9 # LATIN CAPITAL LETTER U WITH GRAVE -0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX -0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x0118 # LATIN CAPITAL LETTER E WITH OGONEK -0xDE 0x021A # LATIN CAPITAL LETTER T WITH COMMA BELOW -0xDF 0x00DF # LATIN SMALL LETTER SHARP S -0xE0 0x00E0 # LATIN SMALL LETTER A WITH GRAVE -0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE3 0x0103 # LATIN SMALL LETTER A WITH BREVE -0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x0107 # LATIN SMALL LETTER C WITH ACUTE -0xE6 0x00E6 # LATIN SMALL LETTER AE -0xE7 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA -0xE8 0x00E8 # LATIN SMALL LETTER E WITH GRAVE -0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE -0xEA 0x00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX -0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x00EC # LATIN SMALL LETTER I WITH GRAVE -0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x00EF # LATIN SMALL LETTER I WITH DIAERESIS -0xF0 0x0111 # LATIN SMALL LETTER D WITH STROKE -0xF1 0x0144 # LATIN SMALL LETTER N WITH ACUTE -0xF2 0x00F2 # LATIN SMALL LETTER O WITH GRAVE -0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x0151 # LATIN SMALL LETTER O WITH DOUBLE ACUTE -0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x015B # LATIN SMALL LETTER S WITH ACUTE -0xF8 0x0171 # LATIN SMALL LETTER U WITH DOUBLE ACUTE -0xF9 0x00F9 # LATIN SMALL LETTER U WITH GRAVE -0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE -0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX -0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x0119 # LATIN SMALL LETTER E WITH OGONEK -0xFE 0x021B # LATIN SMALL LETTER T WITH COMMA BELOW -0xFF 0x00FF # LATIN SMALL LETTER Y WITH DIAERESIS diff --git a/program/lib/encoding/ISO-8859-2.map b/program/lib/encoding/ISO-8859-2.map deleted file mode 100644 index e45df25..0000000 --- a/program/lib/encoding/ISO-8859-2.map +++ /dev/null @@ -1,303 +0,0 @@ -# -# Name: ISO 8859-2:1999 to Unicode -# Unicode version: 3.0 -# Table version: 1.0 -# Table format: Format A -# Date: 1999 July 27 -# Authors: Ken Whistler -# -# Copyright (c) 1991-1999 Unicode, Inc. All Rights reserved. -# -# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). -# No claims are made as to fitness for any particular purpose. No -# warranties of any kind are expressed or implied. The recipient -# agrees to determine applicability of information provided. If this -# file has been provided on optical media by Unicode, Inc., the sole -# remedy for any claim will be exchange of defective media within 90 -# days of receipt. -# -# Unicode, Inc. hereby grants the right to freely use the information -# supplied in this file in the creation of products supporting the -# Unicode Standard, and to make copies of this file in any form for -# internal or external distribution as long as this notice remains -# attached. -# -# General notes: -# -# This table contains the data the Unicode Consortium has on how -# ISO/IEC 8859-2:1999 characters map into Unicode. -# -# Format: Three tab-separated columns -# Column #1 is the ISO/IEC 8859-2 code (in hex as 0xXX) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 the Unicode name (follows a comment sign, '#') -# -# The entries are in ISO/IEC 8859-2 order. -# -# Version history -# 1.0 version updates 0.1 version by adding mappings for all -# control characters. -# -# Updated versions of this file may be found in: -# -# -# Any comments or problems, contact -# Please note that is an archival address; -# notices will be checked, but do not expect an immediate response. -# -0x00 0x0000 # NULL -0x01 0x0001 # START OF HEADING -0x02 0x0002 # START OF TEXT -0x03 0x0003 # END OF TEXT -0x04 0x0004 # END OF TRANSMISSION -0x05 0x0005 # ENQUIRY -0x06 0x0006 # ACKNOWLEDGE -0x07 0x0007 # BELL -0x08 0x0008 # BACKSPACE -0x09 0x0009 # HORIZONTAL TABULATION -0x0A 0x000A # LINE FEED -0x0B 0x000B # VERTICAL TABULATION -0x0C 0x000C # FORM FEED -0x0D 0x000D # CARRIAGE RETURN -0x0E 0x000E # SHIFT OUT -0x0F 0x000F # SHIFT IN -0x10 0x0010 # DATA LINK ESCAPE -0x11 0x0011 # DEVICE CONTROL ONE -0x12 0x0012 # DEVICE CONTROL TWO -0x13 0x0013 # DEVICE CONTROL THREE -0x14 0x0014 # DEVICE CONTROL FOUR -0x15 0x0015 # NEGATIVE ACKNOWLEDGE -0x16 0x0016 # SYNCHRONOUS IDLE -0x17 0x0017 # END OF TRANSMISSION BLOCK -0x18 0x0018 # CANCEL -0x19 0x0019 # END OF MEDIUM -0x1A 0x001A # SUBSTITUTE -0x1B 0x001B # ESCAPE -0x1C 0x001C # FILE SEPARATOR -0x1D 0x001D # GROUP SEPARATOR -0x1E 0x001E # RECORD SEPARATOR -0x1F 0x001F # UNIT SEPARATOR -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # DELETE -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x0104 # LATIN CAPITAL LETTER A WITH OGONEK -0xA2 0x02D8 # BREVE -0xA3 0x0141 # LATIN CAPITAL LETTER L WITH STROKE -0xA4 0x00A4 # CURRENCY SIGN -0xA5 0x013D # LATIN CAPITAL LETTER L WITH CARON -0xA6 0x015A # LATIN CAPITAL LETTER S WITH ACUTE -0xA7 0x00A7 # SECTION SIGN -0xA8 0x00A8 # DIAERESIS -0xA9 0x0160 # LATIN CAPITAL LETTER S WITH CARON -0xAA 0x015E # LATIN CAPITAL LETTER S WITH CEDILLA -0xAB 0x0164 # LATIN CAPITAL LETTER T WITH CARON -0xAC 0x0179 # LATIN CAPITAL LETTER Z WITH ACUTE -0xAD 0x00AD # SOFT HYPHEN -0xAE 0x017D # LATIN CAPITAL LETTER Z WITH CARON -0xAF 0x017B # LATIN CAPITAL LETTER Z WITH DOT ABOVE -0xB0 0x00B0 # DEGREE SIGN -0xB1 0x0105 # LATIN SMALL LETTER A WITH OGONEK -0xB2 0x02DB # OGONEK -0xB3 0x0142 # LATIN SMALL LETTER L WITH STROKE -0xB4 0x00B4 # ACUTE ACCENT -0xB5 0x013E # LATIN SMALL LETTER L WITH CARON -0xB6 0x015B # LATIN SMALL LETTER S WITH ACUTE -0xB7 0x02C7 # CARON -0xB8 0x00B8 # CEDILLA -0xB9 0x0161 # LATIN SMALL LETTER S WITH CARON -0xBA 0x015F # LATIN SMALL LETTER S WITH CEDILLA -0xBB 0x0165 # LATIN SMALL LETTER T WITH CARON -0xBC 0x017A # LATIN SMALL LETTER Z WITH ACUTE -0xBD 0x02DD # DOUBLE ACUTE ACCENT -0xBE 0x017E # LATIN SMALL LETTER Z WITH CARON -0xBF 0x017C # LATIN SMALL LETTER Z WITH DOT ABOVE -0xC0 0x0154 # LATIN CAPITAL LETTER R WITH ACUTE -0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC3 0x0102 # LATIN CAPITAL LETTER A WITH BREVE -0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x0139 # LATIN CAPITAL LETTER L WITH ACUTE -0xC6 0x0106 # LATIN CAPITAL LETTER C WITH ACUTE -0xC7 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA -0xC8 0x010C # LATIN CAPITAL LETTER C WITH CARON -0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x0118 # LATIN CAPITAL LETTER E WITH OGONEK -0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x011A # LATIN CAPITAL LETTER E WITH CARON -0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x010E # LATIN CAPITAL LETTER D WITH CARON -0xD0 0x0110 # LATIN CAPITAL LETTER D WITH STROKE -0xD1 0x0143 # LATIN CAPITAL LETTER N WITH ACUTE -0xD2 0x0147 # LATIN CAPITAL LETTER N WITH CARON -0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX -0xD5 0x0150 # LATIN CAPITAL LETTER O WITH DOUBLE ACUTE -0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x00D7 # MULTIPLICATION SIGN -0xD8 0x0158 # LATIN CAPITAL LETTER R WITH CARON -0xD9 0x016E # LATIN CAPITAL LETTER U WITH RING ABOVE -0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x0170 # LATIN CAPITAL LETTER U WITH DOUBLE ACUTE -0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x00DD # LATIN CAPITAL LETTER Y WITH ACUTE -0xDE 0x0162 # LATIN CAPITAL LETTER T WITH CEDILLA -0xDF 0x00DF # LATIN SMALL LETTER SHARP S -0xE0 0x0155 # LATIN SMALL LETTER R WITH ACUTE -0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE3 0x0103 # LATIN SMALL LETTER A WITH BREVE -0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x013A # LATIN SMALL LETTER L WITH ACUTE -0xE6 0x0107 # LATIN SMALL LETTER C WITH ACUTE -0xE7 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA -0xE8 0x010D # LATIN SMALL LETTER C WITH CARON -0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE -0xEA 0x0119 # LATIN SMALL LETTER E WITH OGONEK -0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x011B # LATIN SMALL LETTER E WITH CARON -0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x010F # LATIN SMALL LETTER D WITH CARON -0xF0 0x0111 # LATIN SMALL LETTER D WITH STROKE -0xF1 0x0144 # LATIN SMALL LETTER N WITH ACUTE -0xF2 0x0148 # LATIN SMALL LETTER N WITH CARON -0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x0151 # LATIN SMALL LETTER O WITH DOUBLE ACUTE -0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x00F7 # DIVISION SIGN -0xF8 0x0159 # LATIN SMALL LETTER R WITH CARON -0xF9 0x016F # LATIN SMALL LETTER U WITH RING ABOVE -0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE -0xFB 0x0171 # LATIN SMALL LETTER U WITH DOUBLE ACUTE -0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x00FD # LATIN SMALL LETTER Y WITH ACUTE -0xFE 0x0163 # LATIN SMALL LETTER T WITH CEDILLA -0xFF 0x02D9 # DOT ABOVE diff --git a/program/lib/encoding/ISO-8859-3.map b/program/lib/encoding/ISO-8859-3.map deleted file mode 100644 index 9b6ac69..0000000 --- a/program/lib/encoding/ISO-8859-3.map +++ /dev/null @@ -1,296 +0,0 @@ -# -# Name: ISO/IEC 8859-3:1999 to Unicode -# Unicode version: 3.0 -# Table version: 1.0 -# Table format: Format A -# Date: 1999 July 27 -# Authors: Ken Whistler -# -# Copyright (c) 1991-1999 Unicode, Inc. All Rights reserved. -# -# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). -# No claims are made as to fitness for any particular purpose. No -# warranties of any kind are expressed or implied. The recipient -# agrees to determine applicability of information provided. If this -# file has been provided on optical media by Unicode, Inc., the sole -# remedy for any claim will be exchange of defective media within 90 -# days of receipt. -# -# Unicode, Inc. hereby grants the right to freely use the information -# supplied in this file in the creation of products supporting the -# Unicode Standard, and to make copies of this file in any form for -# internal or external distribution as long as this notice remains -# attached. -# -# General notes: -# -# This table contains the data the Unicode Consortium has on how -# ISO/IEC 8859-3:1999 characters map into Unicode. -# -# Format: Three tab-separated columns -# Column #1 is the ISO/IEC 8859-3 code (in hex as 0xXX) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 the Unicode name (follows a comment sign, '#') -# -# The entries are in ISO/IEC 8859-3 order. -# -# Version history -# 1.0 version updates 0.1 version by adding mappings for all -# control characters. -# -# Updated versions of this file may be found in: -# -# -# Any comments or problems, contact -# Please note that is an archival address; -# notices will be checked, but do not expect an immediate response. -# -0x00 0x0000 # NULL -0x01 0x0001 # START OF HEADING -0x02 0x0002 # START OF TEXT -0x03 0x0003 # END OF TEXT -0x04 0x0004 # END OF TRANSMISSION -0x05 0x0005 # ENQUIRY -0x06 0x0006 # ACKNOWLEDGE -0x07 0x0007 # BELL -0x08 0x0008 # BACKSPACE -0x09 0x0009 # HORIZONTAL TABULATION -0x0A 0x000A # LINE FEED -0x0B 0x000B # VERTICAL TABULATION -0x0C 0x000C # FORM FEED -0x0D 0x000D # CARRIAGE RETURN -0x0E 0x000E # SHIFT OUT -0x0F 0x000F # SHIFT IN -0x10 0x0010 # DATA LINK ESCAPE -0x11 0x0011 # DEVICE CONTROL ONE -0x12 0x0012 # DEVICE CONTROL TWO -0x13 0x0013 # DEVICE CONTROL THREE -0x14 0x0014 # DEVICE CONTROL FOUR -0x15 0x0015 # NEGATIVE ACKNOWLEDGE -0x16 0x0016 # SYNCHRONOUS IDLE -0x17 0x0017 # END OF TRANSMISSION BLOCK -0x18 0x0018 # CANCEL -0x19 0x0019 # END OF MEDIUM -0x1A 0x001A # SUBSTITUTE -0x1B 0x001B # ESCAPE -0x1C 0x001C # FILE SEPARATOR -0x1D 0x001D # GROUP SEPARATOR -0x1E 0x001E # RECORD SEPARATOR -0x1F 0x001F # UNIT SEPARATOR -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # DELETE -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x0126 # LATIN CAPITAL LETTER H WITH STROKE -0xA2 0x02D8 # BREVE -0xA3 0x00A3 # POUND SIGN -0xA4 0x00A4 # CURRENCY SIGN -0xA6 0x0124 # LATIN CAPITAL LETTER H WITH CIRCUMFLEX -0xA7 0x00A7 # SECTION SIGN -0xA8 0x00A8 # DIAERESIS -0xA9 0x0130 # LATIN CAPITAL LETTER I WITH DOT ABOVE -0xAA 0x015E # LATIN CAPITAL LETTER S WITH CEDILLA -0xAB 0x011E # LATIN CAPITAL LETTER G WITH BREVE -0xAC 0x0134 # LATIN CAPITAL LETTER J WITH CIRCUMFLEX -0xAD 0x00AD # SOFT HYPHEN -0xAF 0x017B # LATIN CAPITAL LETTER Z WITH DOT ABOVE -0xB0 0x00B0 # DEGREE SIGN -0xB1 0x0127 # LATIN SMALL LETTER H WITH STROKE -0xB2 0x00B2 # SUPERSCRIPT TWO -0xB3 0x00B3 # SUPERSCRIPT THREE -0xB4 0x00B4 # ACUTE ACCENT -0xB5 0x00B5 # MICRO SIGN -0xB6 0x0125 # LATIN SMALL LETTER H WITH CIRCUMFLEX -0xB7 0x00B7 # MIDDLE DOT -0xB8 0x00B8 # CEDILLA -0xB9 0x0131 # LATIN SMALL LETTER DOTLESS I -0xBA 0x015F # LATIN SMALL LETTER S WITH CEDILLA -0xBB 0x011F # LATIN SMALL LETTER G WITH BREVE -0xBC 0x0135 # LATIN SMALL LETTER J WITH CIRCUMFLEX -0xBD 0x00BD # VULGAR FRACTION ONE HALF -0xBF 0x017C # LATIN SMALL LETTER Z WITH DOT ABOVE -0xC0 0x00C0 # LATIN CAPITAL LETTER A WITH GRAVE -0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x010A # LATIN CAPITAL LETTER C WITH DOT ABOVE -0xC6 0x0108 # LATIN CAPITAL LETTER C WITH CIRCUMFLEX -0xC7 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA -0xC8 0x00C8 # LATIN CAPITAL LETTER E WITH GRAVE -0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX -0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x00CC # LATIN CAPITAL LETTER I WITH GRAVE -0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x00CF # LATIN CAPITAL LETTER I WITH DIAERESIS -0xD1 0x00D1 # LATIN CAPITAL LETTER N WITH TILDE -0xD2 0x00D2 # LATIN CAPITAL LETTER O WITH GRAVE -0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX -0xD5 0x0120 # LATIN CAPITAL LETTER G WITH DOT ABOVE -0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x00D7 # MULTIPLICATION SIGN -0xD8 0x011C # LATIN CAPITAL LETTER G WITH CIRCUMFLEX -0xD9 0x00D9 # LATIN CAPITAL LETTER U WITH GRAVE -0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX -0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x016C # LATIN CAPITAL LETTER U WITH BREVE -0xDE 0x015C # LATIN CAPITAL LETTER S WITH CIRCUMFLEX -0xDF 0x00DF # LATIN SMALL LETTER SHARP S -0xE0 0x00E0 # LATIN SMALL LETTER A WITH GRAVE -0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x010B # LATIN SMALL LETTER C WITH DOT ABOVE -0xE6 0x0109 # LATIN SMALL LETTER C WITH CIRCUMFLEX -0xE7 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA -0xE8 0x00E8 # LATIN SMALL LETTER E WITH GRAVE -0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE -0xEA 0x00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX -0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x00EC # LATIN SMALL LETTER I WITH GRAVE -0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x00EF # LATIN SMALL LETTER I WITH DIAERESIS -0xF1 0x00F1 # LATIN SMALL LETTER N WITH TILDE -0xF2 0x00F2 # LATIN SMALL LETTER O WITH GRAVE -0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x0121 # LATIN SMALL LETTER G WITH DOT ABOVE -0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x00F7 # DIVISION SIGN -0xF8 0x011D # LATIN SMALL LETTER G WITH CIRCUMFLEX -0xF9 0x00F9 # LATIN SMALL LETTER U WITH GRAVE -0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE -0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX -0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x016D # LATIN SMALL LETTER U WITH BREVE -0xFE 0x015D # LATIN SMALL LETTER S WITH CIRCUMFLEX -0xFF 0x02D9 # DOT ABOVE diff --git a/program/lib/encoding/ISO-8859-4.map b/program/lib/encoding/ISO-8859-4.map deleted file mode 100644 index 662e698..0000000 --- a/program/lib/encoding/ISO-8859-4.map +++ /dev/null @@ -1,303 +0,0 @@ -# -# Name: ISO/IEC 8859-4:1998 to Unicode -# Unicode version: 3.0 -# Table version: 1.0 -# Table format: Format A -# Date: 1999 July 27 -# Authors: Ken Whistler -# -# Copyright (c) 1991-1999 Unicode, Inc. All Rights reserved. -# -# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). -# No claims are made as to fitness for any particular purpose. No -# warranties of any kind are expressed or implied. The recipient -# agrees to determine applicability of information provided. If this -# file has been provided on optical media by Unicode, Inc., the sole -# remedy for any claim will be exchange of defective media within 90 -# days of receipt. -# -# Unicode, Inc. hereby grants the right to freely use the information -# supplied in this file in the creation of products supporting the -# Unicode Standard, and to make copies of this file in any form for -# internal or external distribution as long as this notice remains -# attached. -# -# General notes: -# -# This table contains the data the Unicode Consortium has on how -# ISO/IEC 8859-4:1998 characters map into Unicode. -# -# Format: Three tab-separated columns -# Column #1 is the ISO/IEC 8859-4 code (in hex as 0xXX) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 the Unicode name (follows a comment sign, '#') -# -# The entries are in ISO/IEC 8859-4 order. -# -# Version history -# 1.0 version updates 0.1 version by adding mappings for all -# control characters. -# -# Updated versions of this file may be found in: -# -# -# Any comments or problems, contact -# Please note that is an archival address; -# notices will be checked, but do not expect an immediate response. -# -0x00 0x0000 # NULL -0x01 0x0001 # START OF HEADING -0x02 0x0002 # START OF TEXT -0x03 0x0003 # END OF TEXT -0x04 0x0004 # END OF TRANSMISSION -0x05 0x0005 # ENQUIRY -0x06 0x0006 # ACKNOWLEDGE -0x07 0x0007 # BELL -0x08 0x0008 # BACKSPACE -0x09 0x0009 # HORIZONTAL TABULATION -0x0A 0x000A # LINE FEED -0x0B 0x000B # VERTICAL TABULATION -0x0C 0x000C # FORM FEED -0x0D 0x000D # CARRIAGE RETURN -0x0E 0x000E # SHIFT OUT -0x0F 0x000F # SHIFT IN -0x10 0x0010 # DATA LINK ESCAPE -0x11 0x0011 # DEVICE CONTROL ONE -0x12 0x0012 # DEVICE CONTROL TWO -0x13 0x0013 # DEVICE CONTROL THREE -0x14 0x0014 # DEVICE CONTROL FOUR -0x15 0x0015 # NEGATIVE ACKNOWLEDGE -0x16 0x0016 # SYNCHRONOUS IDLE -0x17 0x0017 # END OF TRANSMISSION BLOCK -0x18 0x0018 # CANCEL -0x19 0x0019 # END OF MEDIUM -0x1A 0x001A # SUBSTITUTE -0x1B 0x001B # ESCAPE -0x1C 0x001C # FILE SEPARATOR -0x1D 0x001D # GROUP SEPARATOR -0x1E 0x001E # RECORD SEPARATOR -0x1F 0x001F # UNIT SEPARATOR -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # DELETE -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x0104 # LATIN CAPITAL LETTER A WITH OGONEK -0xA2 0x0138 # LATIN SMALL LETTER KRA -0xA3 0x0156 # LATIN CAPITAL LETTER R WITH CEDILLA -0xA4 0x00A4 # CURRENCY SIGN -0xA5 0x0128 # LATIN CAPITAL LETTER I WITH TILDE -0xA6 0x013B # LATIN CAPITAL LETTER L WITH CEDILLA -0xA7 0x00A7 # SECTION SIGN -0xA8 0x00A8 # DIAERESIS -0xA9 0x0160 # LATIN CAPITAL LETTER S WITH CARON -0xAA 0x0112 # LATIN CAPITAL LETTER E WITH MACRON -0xAB 0x0122 # LATIN CAPITAL LETTER G WITH CEDILLA -0xAC 0x0166 # LATIN CAPITAL LETTER T WITH STROKE -0xAD 0x00AD # SOFT HYPHEN -0xAE 0x017D # LATIN CAPITAL LETTER Z WITH CARON -0xAF 0x00AF # MACRON -0xB0 0x00B0 # DEGREE SIGN -0xB1 0x0105 # LATIN SMALL LETTER A WITH OGONEK -0xB2 0x02DB # OGONEK -0xB3 0x0157 # LATIN SMALL LETTER R WITH CEDILLA -0xB4 0x00B4 # ACUTE ACCENT -0xB5 0x0129 # LATIN SMALL LETTER I WITH TILDE -0xB6 0x013C # LATIN SMALL LETTER L WITH CEDILLA -0xB7 0x02C7 # CARON -0xB8 0x00B8 # CEDILLA -0xB9 0x0161 # LATIN SMALL LETTER S WITH CARON -0xBA 0x0113 # LATIN SMALL LETTER E WITH MACRON -0xBB 0x0123 # LATIN SMALL LETTER G WITH CEDILLA -0xBC 0x0167 # LATIN SMALL LETTER T WITH STROKE -0xBD 0x014A # LATIN CAPITAL LETTER ENG -0xBE 0x017E # LATIN SMALL LETTER Z WITH CARON -0xBF 0x014B # LATIN SMALL LETTER ENG -0xC0 0x0100 # LATIN CAPITAL LETTER A WITH MACRON -0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC3 0x00C3 # LATIN CAPITAL LETTER A WITH TILDE -0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE -0xC6 0x00C6 # LATIN CAPITAL LETTER AE -0xC7 0x012E # LATIN CAPITAL LETTER I WITH OGONEK -0xC8 0x010C # LATIN CAPITAL LETTER C WITH CARON -0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x0118 # LATIN CAPITAL LETTER E WITH OGONEK -0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x0116 # LATIN CAPITAL LETTER E WITH DOT ABOVE -0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x012A # LATIN CAPITAL LETTER I WITH MACRON -0xD0 0x0110 # LATIN CAPITAL LETTER D WITH STROKE -0xD1 0x0145 # LATIN CAPITAL LETTER N WITH CEDILLA -0xD2 0x014C # LATIN CAPITAL LETTER O WITH MACRON -0xD3 0x0136 # LATIN CAPITAL LETTER K WITH CEDILLA -0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX -0xD5 0x00D5 # LATIN CAPITAL LETTER O WITH TILDE -0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x00D7 # MULTIPLICATION SIGN -0xD8 0x00D8 # LATIN CAPITAL LETTER O WITH STROKE -0xD9 0x0172 # LATIN CAPITAL LETTER U WITH OGONEK -0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX -0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x0168 # LATIN CAPITAL LETTER U WITH TILDE -0xDE 0x016A # LATIN CAPITAL LETTER U WITH MACRON -0xDF 0x00DF # LATIN SMALL LETTER SHARP S -0xE0 0x0101 # LATIN SMALL LETTER A WITH MACRON -0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE3 0x00E3 # LATIN SMALL LETTER A WITH TILDE -0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x00E5 # LATIN SMALL LETTER A WITH RING ABOVE -0xE6 0x00E6 # LATIN SMALL LETTER AE -0xE7 0x012F # LATIN SMALL LETTER I WITH OGONEK -0xE8 0x010D # LATIN SMALL LETTER C WITH CARON -0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE -0xEA 0x0119 # LATIN SMALL LETTER E WITH OGONEK -0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x0117 # LATIN SMALL LETTER E WITH DOT ABOVE -0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x012B # LATIN SMALL LETTER I WITH MACRON -0xF0 0x0111 # LATIN SMALL LETTER D WITH STROKE -0xF1 0x0146 # LATIN SMALL LETTER N WITH CEDILLA -0xF2 0x014D # LATIN SMALL LETTER O WITH MACRON -0xF3 0x0137 # LATIN SMALL LETTER K WITH CEDILLA -0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x00F5 # LATIN SMALL LETTER O WITH TILDE -0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x00F7 # DIVISION SIGN -0xF8 0x00F8 # LATIN SMALL LETTER O WITH STROKE -0xF9 0x0173 # LATIN SMALL LETTER U WITH OGONEK -0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE -0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX -0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x0169 # LATIN SMALL LETTER U WITH TILDE -0xFE 0x016B # LATIN SMALL LETTER U WITH MACRON -0xFF 0x02D9 # DOT ABOVE diff --git a/program/lib/encoding/ISO-8859-5.map b/program/lib/encoding/ISO-8859-5.map deleted file mode 100644 index a7ed1ce..0000000 --- a/program/lib/encoding/ISO-8859-5.map +++ /dev/null @@ -1,303 +0,0 @@ -# -# Name: ISO 8859-5:1999 to Unicode -# Unicode version: 3.0 -# Table version: 1.0 -# Table format: Format A -# Date: 1999 July 27 -# Authors: Ken Whistler -# -# Copyright (c) 1991-1999 Unicode, Inc. All Rights reserved. -# -# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). -# No claims are made as to fitness for any particular purpose. No -# warranties of any kind are expressed or implied. The recipient -# agrees to determine applicability of information provided. If this -# file has been provided on optical media by Unicode, Inc., the sole -# remedy for any claim will be exchange of defective media within 90 -# days of receipt. -# -# Unicode, Inc. hereby grants the right to freely use the information -# supplied in this file in the creation of products supporting the -# Unicode Standard, and to make copies of this file in any form for -# internal or external distribution as long as this notice remains -# attached. -# -# General notes: -# -# This table contains the data the Unicode Consortium has on how -# ISO/IEC 8859-5:1999 characters map into Unicode. -# -# Format: Three tab-separated columns -# Column #1 is the ISO/IEC 8859-5 code (in hex as 0xXX) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 the Unicode name (follows a comment sign, '#') -# -# The entries are in ISO/IEC 8859-5 order. -# -# Version history -# 1.0 version updates 0.1 version by adding mappings for all -# control characters. -# -# Updated versions of this file may be found in: -# -# -# Any comments or problems, contact -# Please note that is an archival address; -# notices will be checked, but do not expect an immediate response. -# -0x00 0x0000 # NULL -0x01 0x0001 # START OF HEADING -0x02 0x0002 # START OF TEXT -0x03 0x0003 # END OF TEXT -0x04 0x0004 # END OF TRANSMISSION -0x05 0x0005 # ENQUIRY -0x06 0x0006 # ACKNOWLEDGE -0x07 0x0007 # BELL -0x08 0x0008 # BACKSPACE -0x09 0x0009 # HORIZONTAL TABULATION -0x0A 0x000A # LINE FEED -0x0B 0x000B # VERTICAL TABULATION -0x0C 0x000C # FORM FEED -0x0D 0x000D # CARRIAGE RETURN -0x0E 0x000E # SHIFT OUT -0x0F 0x000F # SHIFT IN -0x10 0x0010 # DATA LINK ESCAPE -0x11 0x0011 # DEVICE CONTROL ONE -0x12 0x0012 # DEVICE CONTROL TWO -0x13 0x0013 # DEVICE CONTROL THREE -0x14 0x0014 # DEVICE CONTROL FOUR -0x15 0x0015 # NEGATIVE ACKNOWLEDGE -0x16 0x0016 # SYNCHRONOUS IDLE -0x17 0x0017 # END OF TRANSMISSION BLOCK -0x18 0x0018 # CANCEL -0x19 0x0019 # END OF MEDIUM -0x1A 0x001A # SUBSTITUTE -0x1B 0x001B # ESCAPE -0x1C 0x001C # FILE SEPARATOR -0x1D 0x001D # GROUP SEPARATOR -0x1E 0x001E # RECORD SEPARATOR -0x1F 0x001F # UNIT SEPARATOR -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # DELETE -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x0401 # CYRILLIC CAPITAL LETTER IO -0xA2 0x0402 # CYRILLIC CAPITAL LETTER DJE -0xA3 0x0403 # CYRILLIC CAPITAL LETTER GJE -0xA4 0x0404 # CYRILLIC CAPITAL LETTER UKRAINIAN IE -0xA5 0x0405 # CYRILLIC CAPITAL LETTER DZE -0xA6 0x0406 # CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I -0xA7 0x0407 # CYRILLIC CAPITAL LETTER YI -0xA8 0x0408 # CYRILLIC CAPITAL LETTER JE -0xA9 0x0409 # CYRILLIC CAPITAL LETTER LJE -0xAA 0x040A # CYRILLIC CAPITAL LETTER NJE -0xAB 0x040B # CYRILLIC CAPITAL LETTER TSHE -0xAC 0x040C # CYRILLIC CAPITAL LETTER KJE -0xAD 0x00AD # SOFT HYPHEN -0xAE 0x040E # CYRILLIC CAPITAL LETTER SHORT U -0xAF 0x040F # CYRILLIC CAPITAL LETTER DZHE -0xB0 0x0410 # CYRILLIC CAPITAL LETTER A -0xB1 0x0411 # CYRILLIC CAPITAL LETTER BE -0xB2 0x0412 # CYRILLIC CAPITAL LETTER VE -0xB3 0x0413 # CYRILLIC CAPITAL LETTER GHE -0xB4 0x0414 # CYRILLIC CAPITAL LETTER DE -0xB5 0x0415 # CYRILLIC CAPITAL LETTER IE -0xB6 0x0416 # CYRILLIC CAPITAL LETTER ZHE -0xB7 0x0417 # CYRILLIC CAPITAL LETTER ZE -0xB8 0x0418 # CYRILLIC CAPITAL LETTER I -0xB9 0x0419 # CYRILLIC CAPITAL LETTER SHORT I -0xBA 0x041A # CYRILLIC CAPITAL LETTER KA -0xBB 0x041B # CYRILLIC CAPITAL LETTER EL -0xBC 0x041C # CYRILLIC CAPITAL LETTER EM -0xBD 0x041D # CYRILLIC CAPITAL LETTER EN -0xBE 0x041E # CYRILLIC CAPITAL LETTER O -0xBF 0x041F # CYRILLIC CAPITAL LETTER PE -0xC0 0x0420 # CYRILLIC CAPITAL LETTER ER -0xC1 0x0421 # CYRILLIC CAPITAL LETTER ES -0xC2 0x0422 # CYRILLIC CAPITAL LETTER TE -0xC3 0x0423 # CYRILLIC CAPITAL LETTER U -0xC4 0x0424 # CYRILLIC CAPITAL LETTER EF -0xC5 0x0425 # CYRILLIC CAPITAL LETTER HA -0xC6 0x0426 # CYRILLIC CAPITAL LETTER TSE -0xC7 0x0427 # CYRILLIC CAPITAL LETTER CHE -0xC8 0x0428 # CYRILLIC CAPITAL LETTER SHA -0xC9 0x0429 # CYRILLIC CAPITAL LETTER SHCHA -0xCA 0x042A # CYRILLIC CAPITAL LETTER HARD SIGN -0xCB 0x042B # CYRILLIC CAPITAL LETTER YERU -0xCC 0x042C # CYRILLIC CAPITAL LETTER SOFT SIGN -0xCD 0x042D # CYRILLIC CAPITAL LETTER E -0xCE 0x042E # CYRILLIC CAPITAL LETTER YU -0xCF 0x042F # CYRILLIC CAPITAL LETTER YA -0xD0 0x0430 # CYRILLIC SMALL LETTER A -0xD1 0x0431 # CYRILLIC SMALL LETTER BE -0xD2 0x0432 # CYRILLIC SMALL LETTER VE -0xD3 0x0433 # CYRILLIC SMALL LETTER GHE -0xD4 0x0434 # CYRILLIC SMALL LETTER DE -0xD5 0x0435 # CYRILLIC SMALL LETTER IE -0xD6 0x0436 # CYRILLIC SMALL LETTER ZHE -0xD7 0x0437 # CYRILLIC SMALL LETTER ZE -0xD8 0x0438 # CYRILLIC SMALL LETTER I -0xD9 0x0439 # CYRILLIC SMALL LETTER SHORT I -0xDA 0x043A # CYRILLIC SMALL LETTER KA -0xDB 0x043B # CYRILLIC SMALL LETTER EL -0xDC 0x043C # CYRILLIC SMALL LETTER EM -0xDD 0x043D # CYRILLIC SMALL LETTER EN -0xDE 0x043E # CYRILLIC SMALL LETTER O -0xDF 0x043F # CYRILLIC SMALL LETTER PE -0xE0 0x0440 # CYRILLIC SMALL LETTER ER -0xE1 0x0441 # CYRILLIC SMALL LETTER ES -0xE2 0x0442 # CYRILLIC SMALL LETTER TE -0xE3 0x0443 # CYRILLIC SMALL LETTER U -0xE4 0x0444 # CYRILLIC SMALL LETTER EF -0xE5 0x0445 # CYRILLIC SMALL LETTER HA -0xE6 0x0446 # CYRILLIC SMALL LETTER TSE -0xE7 0x0447 # CYRILLIC SMALL LETTER CHE -0xE8 0x0448 # CYRILLIC SMALL LETTER SHA -0xE9 0x0449 # CYRILLIC SMALL LETTER SHCHA -0xEA 0x044A # CYRILLIC SMALL LETTER HARD SIGN -0xEB 0x044B # CYRILLIC SMALL LETTER YERU -0xEC 0x044C # CYRILLIC SMALL LETTER SOFT SIGN -0xED 0x044D # CYRILLIC SMALL LETTER E -0xEE 0x044E # CYRILLIC SMALL LETTER YU -0xEF 0x044F # CYRILLIC SMALL LETTER YA -0xF0 0x2116 # NUMERO SIGN -0xF1 0x0451 # CYRILLIC SMALL LETTER IO -0xF2 0x0452 # CYRILLIC SMALL LETTER DJE -0xF3 0x0453 # CYRILLIC SMALL LETTER GJE -0xF4 0x0454 # CYRILLIC SMALL LETTER UKRAINIAN IE -0xF5 0x0455 # CYRILLIC SMALL LETTER DZE -0xF6 0x0456 # CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I -0xF7 0x0457 # CYRILLIC SMALL LETTER YI -0xF8 0x0458 # CYRILLIC SMALL LETTER JE -0xF9 0x0459 # CYRILLIC SMALL LETTER LJE -0xFA 0x045A # CYRILLIC SMALL LETTER NJE -0xFB 0x045B # CYRILLIC SMALL LETTER TSHE -0xFC 0x045C # CYRILLIC SMALL LETTER KJE -0xFD 0x00A7 # SECTION SIGN -0xFE 0x045E # CYRILLIC SMALL LETTER SHORT U -0xFF 0x045F # CYRILLIC SMALL LETTER DZHE diff --git a/program/lib/encoding/ISO-8859-6.map b/program/lib/encoding/ISO-8859-6.map deleted file mode 100644 index 69ac7f5..0000000 --- a/program/lib/encoding/ISO-8859-6.map +++ /dev/null @@ -1,260 +0,0 @@ -# -# Name: ISO 8859-6:1999 to Unicode -# Unicode version: 3.0 -# Table version: 1.0 -# Table format: Format A -# Date: 1999 July 27 -# Authors: Ken Whistler -# -# Copyright (c) 1991-1999 Unicode, Inc. All Rights reserved. -# -# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). -# No claims are made as to fitness for any particular purpose. No -# warranties of any kind are expressed or implied. The recipient -# agrees to determine applicability of information provided. If this -# file has been provided on optical media by Unicode, Inc., the sole -# remedy for any claim will be exchange of defective media within 90 -# days of receipt. -# -# Unicode, Inc. hereby grants the right to freely use the information -# supplied in this file in the creation of products supporting the -# Unicode Standard, and to make copies of this file in any form for -# internal or external distribution as long as this notice remains -# attached. -# -# General notes: -# -# This table contains the data the Unicode Consortium has on how -# ISO/IEC 8859-6:1999 characters map into Unicode. -# -# Format: Three tab-separated columns -# Column #1 is the ISO/IEC 8859-6 code (in hex as 0xXX) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 the Unicode name (follows a comment sign, '#') -# -# The entries are in ISO/IEC 8859-6 order. -# -# Version history -# 1.0 version updates 0.1 version by adding mappings for all -# control characters. -# 0x30..0x39 remapped to the ASCII digits (U+0030..U+0039) instead -# of the Arabic digits (U+0660..U+0669). -# -# Updated versions of this file may be found in: -# -# -# Any comments or problems, contact -# Please note that is an archival address; -# notices will be checked, but do not expect an immediate response. -# -0x00 0x0000 # NULL -0x01 0x0001 # START OF HEADING -0x02 0x0002 # START OF TEXT -0x03 0x0003 # END OF TEXT -0x04 0x0004 # END OF TRANSMISSION -0x05 0x0005 # ENQUIRY -0x06 0x0006 # ACKNOWLEDGE -0x07 0x0007 # BELL -0x08 0x0008 # BACKSPACE -0x09 0x0009 # HORIZONTAL TABULATION -0x0A 0x000A # LINE FEED -0x0B 0x000B # VERTICAL TABULATION -0x0C 0x000C # FORM FEED -0x0D 0x000D # CARRIAGE RETURN -0x0E 0x000E # SHIFT OUT -0x0F 0x000F # SHIFT IN -0x10 0x0010 # DATA LINK ESCAPE -0x11 0x0011 # DEVICE CONTROL ONE -0x12 0x0012 # DEVICE CONTROL TWO -0x13 0x0013 # DEVICE CONTROL THREE -0x14 0x0014 # DEVICE CONTROL FOUR -0x15 0x0015 # NEGATIVE ACKNOWLEDGE -0x16 0x0016 # SYNCHRONOUS IDLE -0x17 0x0017 # END OF TRANSMISSION BLOCK -0x18 0x0018 # CANCEL -0x19 0x0019 # END OF MEDIUM -0x1A 0x001A # SUBSTITUTE -0x1B 0x001B # ESCAPE -0x1C 0x001C # FILE SEPARATOR -0x1D 0x001D # GROUP SEPARATOR -0x1E 0x001E # RECORD SEPARATOR -0x1F 0x001F # UNIT SEPARATOR -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # DELETE -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA4 0x00A4 # CURRENCY SIGN -0xAC 0x060C # ARABIC COMMA -0xAD 0x00AD # SOFT HYPHEN -0xBB 0x061B # ARABIC SEMICOLON -0xBF 0x061F # ARABIC QUESTION MARK -0xC1 0x0621 # ARABIC LETTER HAMZA -0xC2 0x0622 # ARABIC LETTER ALEF WITH MADDA ABOVE -0xC3 0x0623 # ARABIC LETTER ALEF WITH HAMZA ABOVE -0xC4 0x0624 # ARABIC LETTER WAW WITH HAMZA ABOVE -0xC5 0x0625 # ARABIC LETTER ALEF WITH HAMZA BELOW -0xC6 0x0626 # ARABIC LETTER YEH WITH HAMZA ABOVE -0xC7 0x0627 # ARABIC LETTER ALEF -0xC8 0x0628 # ARABIC LETTER BEH -0xC9 0x0629 # ARABIC LETTER TEH MARBUTA -0xCA 0x062A # ARABIC LETTER TEH -0xCB 0x062B # ARABIC LETTER THEH -0xCC 0x062C # ARABIC LETTER JEEM -0xCD 0x062D # ARABIC LETTER HAH -0xCE 0x062E # ARABIC LETTER KHAH -0xCF 0x062F # ARABIC LETTER DAL -0xD0 0x0630 # ARABIC LETTER THAL -0xD1 0x0631 # ARABIC LETTER REH -0xD2 0x0632 # ARABIC LETTER ZAIN -0xD3 0x0633 # ARABIC LETTER SEEN -0xD4 0x0634 # ARABIC LETTER SHEEN -0xD5 0x0635 # ARABIC LETTER SAD -0xD6 0x0636 # ARABIC LETTER DAD -0xD7 0x0637 # ARABIC LETTER TAH -0xD8 0x0638 # ARABIC LETTER ZAH -0xD9 0x0639 # ARABIC LETTER AIN -0xDA 0x063A # ARABIC LETTER GHAIN -0xE0 0x0640 # ARABIC TATWEEL -0xE1 0x0641 # ARABIC LETTER FEH -0xE2 0x0642 # ARABIC LETTER QAF -0xE3 0x0643 # ARABIC LETTER KAF -0xE4 0x0644 # ARABIC LETTER LAM -0xE5 0x0645 # ARABIC LETTER MEEM -0xE6 0x0646 # ARABIC LETTER NOON -0xE7 0x0647 # ARABIC LETTER HEH -0xE8 0x0648 # ARABIC LETTER WAW -0xE9 0x0649 # ARABIC LETTER ALEF MAKSURA -0xEA 0x064A # ARABIC LETTER YEH -0xEB 0x064B # ARABIC FATHATAN -0xEC 0x064C # ARABIC DAMMATAN -0xED 0x064D # ARABIC KASRATAN -0xEE 0x064E # ARABIC FATHA -0xEF 0x064F # ARABIC DAMMA -0xF0 0x0650 # ARABIC KASRA -0xF1 0x0651 # ARABIC SHADDA -0xF2 0x0652 # ARABIC SUKUN diff --git a/program/lib/encoding/ISO-8859-7.map b/program/lib/encoding/ISO-8859-7.map deleted file mode 100644 index bc46b74..0000000 --- a/program/lib/encoding/ISO-8859-7.map +++ /dev/null @@ -1,308 +0,0 @@ -# -# Name: ISO 8859-7:2003 to Unicode -# Unicode version: 4.0 -# Table version: 2.0 -# Table format: Format A -# Date: 2003-Nov-12 -# Authors: Ken Whistler -# -# Copyright (c) 1991-2003 Unicode, Inc. All Rights reserved. -# -# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). -# No claims are made as to fitness for any particular purpose. No -# warranties of any kind are expressed or implied. The recipient -# agrees to determine applicability of information provided. If this -# file has been provided on optical media by Unicode, Inc., the sole -# remedy for any claim will be exchange of defective media within 90 -# days of receipt. -# -# Unicode, Inc. hereby grants the right to freely use the information -# supplied in this file in the creation of products supporting the -# Unicode Standard, and to make copies of this file in any form for -# internal or external distribution as long as this notice remains -# attached. -# -# General notes: -# -# This table contains the data the Unicode Consortium has on how -# ISO 8859-7:2003 characters map into Unicode. -# -# ISO 8859-7:1987 is equivalent to ISO-IR-126, ELOT 928, -# and ECMA 118. ISO 8859-7:2003 adds two currency signs -# and one other character not in the earlier standard. -# -# Format: Three tab-separated columns -# Column #1 is the ISO 8859-7 code (in hex as 0xXX) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 the Unicode name (follows a comment sign, '#') -# -# The entries are in ISO 8859-7 order. -# -# Version history -# 1.0 version updates 0.1 version by adding mappings for all -# control characters. -# Remap 0xA1 to U+2018 (instead of 0x02BD) to match text of 8859-7 -# Remap 0xA2 to U+2019 (instead of 0x02BC) to match text of 8859-7 -# -# 2.0 version updates 1.0 version by adding mappings for the -# three newly added characters 0xA4, 0xA5, 0xAA. -# -# Updated versions of this file may be found in: -# -# -# Any comments or problems, contact the Unicode Consortium at: -# -# -0x00 0x0000 # NULL -0x01 0x0001 # START OF HEADING -0x02 0x0002 # START OF TEXT -0x03 0x0003 # END OF TEXT -0x04 0x0004 # END OF TRANSMISSION -0x05 0x0005 # ENQUIRY -0x06 0x0006 # ACKNOWLEDGE -0x07 0x0007 # BELL -0x08 0x0008 # BACKSPACE -0x09 0x0009 # HORIZONTAL TABULATION -0x0A 0x000A # LINE FEED -0x0B 0x000B # VERTICAL TABULATION -0x0C 0x000C # FORM FEED -0x0D 0x000D # CARRIAGE RETURN -0x0E 0x000E # SHIFT OUT -0x0F 0x000F # SHIFT IN -0x10 0x0010 # DATA LINK ESCAPE -0x11 0x0011 # DEVICE CONTROL ONE -0x12 0x0012 # DEVICE CONTROL TWO -0x13 0x0013 # DEVICE CONTROL THREE -0x14 0x0014 # DEVICE CONTROL FOUR -0x15 0x0015 # NEGATIVE ACKNOWLEDGE -0x16 0x0016 # SYNCHRONOUS IDLE -0x17 0x0017 # END OF TRANSMISSION BLOCK -0x18 0x0018 # CANCEL -0x19 0x0019 # END OF MEDIUM -0x1A 0x001A # SUBSTITUTE -0x1B 0x001B # ESCAPE -0x1C 0x001C # FILE SEPARATOR -0x1D 0x001D # GROUP SEPARATOR -0x1E 0x001E # RECORD SEPARATOR -0x1F 0x001F # UNIT SEPARATOR -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # DELETE -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x2018 # LEFT SINGLE QUOTATION MARK -0xA2 0x2019 # RIGHT SINGLE QUOTATION MARK -0xA3 0x00A3 # POUND SIGN -0xA4 0x20AC # EURO SIGN -0xA5 0x20AF # DRACHMA SIGN -0xA6 0x00A6 # BROKEN BAR -0xA7 0x00A7 # SECTION SIGN -0xA8 0x00A8 # DIAERESIS -0xA9 0x00A9 # COPYRIGHT SIGN -0xAA 0x037A # GREEK YPOGEGRAMMENI -0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC # NOT SIGN -0xAD 0x00AD # SOFT HYPHEN -0xAF 0x2015 # HORIZONTAL BAR -0xB0 0x00B0 # DEGREE SIGN -0xB1 0x00B1 # PLUS-MINUS SIGN -0xB2 0x00B2 # SUPERSCRIPT TWO -0xB3 0x00B3 # SUPERSCRIPT THREE -0xB4 0x0384 # GREEK TONOS -0xB5 0x0385 # GREEK DIALYTIKA TONOS -0xB6 0x0386 # GREEK CAPITAL LETTER ALPHA WITH TONOS -0xB7 0x00B7 # MIDDLE DOT -0xB8 0x0388 # GREEK CAPITAL LETTER EPSILON WITH TONOS -0xB9 0x0389 # GREEK CAPITAL LETTER ETA WITH TONOS -0xBA 0x038A # GREEK CAPITAL LETTER IOTA WITH TONOS -0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x038C # GREEK CAPITAL LETTER OMICRON WITH TONOS -0xBD 0x00BD # VULGAR FRACTION ONE HALF -0xBE 0x038E # GREEK CAPITAL LETTER UPSILON WITH TONOS -0xBF 0x038F # GREEK CAPITAL LETTER OMEGA WITH TONOS -0xC0 0x0390 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS -0xC1 0x0391 # GREEK CAPITAL LETTER ALPHA -0xC2 0x0392 # GREEK CAPITAL LETTER BETA -0xC3 0x0393 # GREEK CAPITAL LETTER GAMMA -0xC4 0x0394 # GREEK CAPITAL LETTER DELTA -0xC5 0x0395 # GREEK CAPITAL LETTER EPSILON -0xC6 0x0396 # GREEK CAPITAL LETTER ZETA -0xC7 0x0397 # GREEK CAPITAL LETTER ETA -0xC8 0x0398 # GREEK CAPITAL LETTER THETA -0xC9 0x0399 # GREEK CAPITAL LETTER IOTA -0xCA 0x039A # GREEK CAPITAL LETTER KAPPA -0xCB 0x039B # GREEK CAPITAL LETTER LAMDA -0xCC 0x039C # GREEK CAPITAL LETTER MU -0xCD 0x039D # GREEK CAPITAL LETTER NU -0xCE 0x039E # GREEK CAPITAL LETTER XI -0xCF 0x039F # GREEK CAPITAL LETTER OMICRON -0xD0 0x03A0 # GREEK CAPITAL LETTER PI -0xD1 0x03A1 # GREEK CAPITAL LETTER RHO -0xD3 0x03A3 # GREEK CAPITAL LETTER SIGMA -0xD4 0x03A4 # GREEK CAPITAL LETTER TAU -0xD5 0x03A5 # GREEK CAPITAL LETTER UPSILON -0xD6 0x03A6 # GREEK CAPITAL LETTER PHI -0xD7 0x03A7 # GREEK CAPITAL LETTER CHI -0xD8 0x03A8 # GREEK CAPITAL LETTER PSI -0xD9 0x03A9 # GREEK CAPITAL LETTER OMEGA -0xDA 0x03AA # GREEK CAPITAL LETTER IOTA WITH DIALYTIKA -0xDB 0x03AB # GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA -0xDC 0x03AC # GREEK SMALL LETTER ALPHA WITH TONOS -0xDD 0x03AD # GREEK SMALL LETTER EPSILON WITH TONOS -0xDE 0x03AE # GREEK SMALL LETTER ETA WITH TONOS -0xDF 0x03AF # GREEK SMALL LETTER IOTA WITH TONOS -0xE0 0x03B0 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS -0xE1 0x03B1 # GREEK SMALL LETTER ALPHA -0xE2 0x03B2 # GREEK SMALL LETTER BETA -0xE3 0x03B3 # GREEK SMALL LETTER GAMMA -0xE4 0x03B4 # GREEK SMALL LETTER DELTA -0xE5 0x03B5 # GREEK SMALL LETTER EPSILON -0xE6 0x03B6 # GREEK SMALL LETTER ZETA -0xE7 0x03B7 # GREEK SMALL LETTER ETA -0xE8 0x03B8 # GREEK SMALL LETTER THETA -0xE9 0x03B9 # GREEK SMALL LETTER IOTA -0xEA 0x03BA # GREEK SMALL LETTER KAPPA -0xEB 0x03BB # GREEK SMALL LETTER LAMDA -0xEC 0x03BC # GREEK SMALL LETTER MU -0xED 0x03BD # GREEK SMALL LETTER NU -0xEE 0x03BE # GREEK SMALL LETTER XI -0xEF 0x03BF # GREEK SMALL LETTER OMICRON -0xF0 0x03C0 # GREEK SMALL LETTER PI -0xF1 0x03C1 # GREEK SMALL LETTER RHO -0xF2 0x03C2 # GREEK SMALL LETTER FINAL SIGMA -0xF3 0x03C3 # GREEK SMALL LETTER SIGMA -0xF4 0x03C4 # GREEK SMALL LETTER TAU -0xF5 0x03C5 # GREEK SMALL LETTER UPSILON -0xF6 0x03C6 # GREEK SMALL LETTER PHI -0xF7 0x03C7 # GREEK SMALL LETTER CHI -0xF8 0x03C8 # GREEK SMALL LETTER PSI -0xF9 0x03C9 # GREEK SMALL LETTER OMEGA -0xFA 0x03CA # GREEK SMALL LETTER IOTA WITH DIALYTIKA -0xFB 0x03CB # GREEK SMALL LETTER UPSILON WITH DIALYTIKA -0xFC 0x03CC # GREEK SMALL LETTER OMICRON WITH TONOS -0xFD 0x03CD # GREEK SMALL LETTER UPSILON WITH TONOS -0xFE 0x03CE # GREEK SMALL LETTER OMEGA WITH TONOS diff --git a/program/lib/encoding/ISO-8859-8.map b/program/lib/encoding/ISO-8859-8.map deleted file mode 100644 index bc8da4c..0000000 --- a/program/lib/encoding/ISO-8859-8.map +++ /dev/null @@ -1,270 +0,0 @@ -# -# Name: ISO/IEC 8859-8:1999 to Unicode -# Unicode version: 3.0 -# Table version: 1.1 -# Table format: Format A -# Date: 2000-Jan-03 -# Authors: Ken Whistler -# -# Copyright (c) 1991-1999 Unicode, Inc. All Rights reserved. -# -# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). -# No claims are made as to fitness for any particular purpose. No -# warranties of any kind are expressed or implied. The recipient -# agrees to determine applicability of information provided. If this -# file has been provided on optical media by Unicode, Inc., the sole -# remedy for any claim will be exchange of defective media within 90 -# days of receipt. -# -# Unicode, Inc. hereby grants the right to freely use the information -# supplied in this file in the creation of products supporting the -# Unicode Standard, and to make copies of this file in any form for -# internal or external distribution as long as this notice remains -# attached. -# -# General notes: -# -# This table contains the data the Unicode Consortium has on how -# ISO/IEC 8859-8:1999 characters map into Unicode. -# -# Format: Three tab-separated columns -# Column #1 is the ISO/IEC 8859-8 code (in hex as 0xXX) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 the Unicode name (follows a comment sign, '#') -# -# The entries are in ISO/IEC 8859-8 order. -# -# Version history -# 1.0 version updates 0.1 version by adding mappings for all -# control characters. -# 1.1 version updates to the published 8859-8:1999, correcting -# the mapping of 0xAF and adding mappings for LRM and RLM. -# -# Updated versions of this file may be found in: -# -# -# Any comments or problems, contact -# Please note that is an archival address; -# notices will be checked, but do not expect an immediate response. -# -0x00 0x0000 # NULL -0x01 0x0001 # START OF HEADING -0x02 0x0002 # START OF TEXT -0x03 0x0003 # END OF TEXT -0x04 0x0004 # END OF TRANSMISSION -0x05 0x0005 # ENQUIRY -0x06 0x0006 # ACKNOWLEDGE -0x07 0x0007 # BELL -0x08 0x0008 # BACKSPACE -0x09 0x0009 # HORIZONTAL TABULATION -0x0A 0x000A # LINE FEED -0x0B 0x000B # VERTICAL TABULATION -0x0C 0x000C # FORM FEED -0x0D 0x000D # CARRIAGE RETURN -0x0E 0x000E # SHIFT OUT -0x0F 0x000F # SHIFT IN -0x10 0x0010 # DATA LINK ESCAPE -0x11 0x0011 # DEVICE CONTROL ONE -0x12 0x0012 # DEVICE CONTROL TWO -0x13 0x0013 # DEVICE CONTROL THREE -0x14 0x0014 # DEVICE CONTROL FOUR -0x15 0x0015 # NEGATIVE ACKNOWLEDGE -0x16 0x0016 # SYNCHRONOUS IDLE -0x17 0x0017 # END OF TRANSMISSION BLOCK -0x18 0x0018 # CANCEL -0x19 0x0019 # END OF MEDIUM -0x1A 0x001A # SUBSTITUTE -0x1B 0x001B # ESCAPE -0x1C 0x001C # FILE SEPARATOR -0x1D 0x001D # GROUP SEPARATOR -0x1E 0x001E # RECORD SEPARATOR -0x1F 0x001F # UNIT SEPARATOR -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # DELETE -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA2 0x00A2 # CENT SIGN -0xA3 0x00A3 # POUND SIGN -0xA4 0x00A4 # CURRENCY SIGN -0xA5 0x00A5 # YEN SIGN -0xA6 0x00A6 # BROKEN BAR -0xA7 0x00A7 # SECTION SIGN -0xA8 0x00A8 # DIAERESIS -0xA9 0x00A9 # COPYRIGHT SIGN -0xAA 0x00D7 # MULTIPLICATION SIGN -0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC # NOT SIGN -0xAD 0x00AD # SOFT HYPHEN -0xAE 0x00AE # REGISTERED SIGN -0xAF 0x00AF # MACRON -0xB0 0x00B0 # DEGREE SIGN -0xB1 0x00B1 # PLUS-MINUS SIGN -0xB2 0x00B2 # SUPERSCRIPT TWO -0xB3 0x00B3 # SUPERSCRIPT THREE -0xB4 0x00B4 # ACUTE ACCENT -0xB5 0x00B5 # MICRO SIGN -0xB6 0x00B6 # PILCROW SIGN -0xB7 0x00B7 # MIDDLE DOT -0xB8 0x00B8 # CEDILLA -0xB9 0x00B9 # SUPERSCRIPT ONE -0xBA 0x00F7 # DIVISION SIGN -0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x00BC # VULGAR FRACTION ONE QUARTER -0xBD 0x00BD # VULGAR FRACTION ONE HALF -0xBE 0x00BE # VULGAR FRACTION THREE QUARTERS -0xDF 0x2017 # DOUBLE LOW LINE -0xE0 0x05D0 # HEBREW LETTER ALEF -0xE1 0x05D1 # HEBREW LETTER BET -0xE2 0x05D2 # HEBREW LETTER GIMEL -0xE3 0x05D3 # HEBREW LETTER DALET -0xE4 0x05D4 # HEBREW LETTER HE -0xE5 0x05D5 # HEBREW LETTER VAV -0xE6 0x05D6 # HEBREW LETTER ZAYIN -0xE7 0x05D7 # HEBREW LETTER HET -0xE8 0x05D8 # HEBREW LETTER TET -0xE9 0x05D9 # HEBREW LETTER YOD -0xEA 0x05DA # HEBREW LETTER FINAL KAF -0xEB 0x05DB # HEBREW LETTER KAF -0xEC 0x05DC # HEBREW LETTER LAMED -0xED 0x05DD # HEBREW LETTER FINAL MEM -0xEE 0x05DE # HEBREW LETTER MEM -0xEF 0x05DF # HEBREW LETTER FINAL NUN -0xF0 0x05E0 # HEBREW LETTER NUN -0xF1 0x05E1 # HEBREW LETTER SAMEKH -0xF2 0x05E2 # HEBREW LETTER AYIN -0xF3 0x05E3 # HEBREW LETTER FINAL PE -0xF4 0x05E4 # HEBREW LETTER PE -0xF5 0x05E5 # HEBREW LETTER FINAL TSADI -0xF6 0x05E6 # HEBREW LETTER TSADI -0xF7 0x05E7 # HEBREW LETTER QOF -0xF8 0x05E8 # HEBREW LETTER RESH -0xF9 0x05E9 # HEBREW LETTER SHIN -0xFA 0x05EA # HEBREW LETTER TAV -0xFD 0x200E # LEFT-TO-RIGHT MARK -0xFE 0x200F # RIGHT-TO-LEFT MARK - diff --git a/program/lib/encoding/ISO-8859-9.map b/program/lib/encoding/ISO-8859-9.map deleted file mode 100644 index 22901f1..0000000 --- a/program/lib/encoding/ISO-8859-9.map +++ /dev/null @@ -1,307 +0,0 @@ -# -# Name: ISO/IEC 8859-9:1999 to Unicode -# Unicode version: 3.0 -# Table version: 1.0 -# Table format: Format A -# Date: 1999 July 27 -# Authors: Ken Whistler -# -# Copyright (c) 1991-1999 Unicode, Inc. All Rights reserved. -# -# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). -# No claims are made as to fitness for any particular purpose. No -# warranties of any kind are expressed or implied. The recipient -# agrees to determine applicability of information provided. If this -# file has been provided on magnetic media by Unicode, Inc., the sole -# remedy for any claim will be exchange of defective media within 90 -# days of receipt. -# -# Unicode, Inc. hereby grants the right to freely use the information -# supplied in this file in the creation of products supporting the -# Unicode Standard, and to make copies of this file in any form for -# internal or external distribution as long as this notice remains -# attached. -# -# General notes: -# -# This table contains the data the Unicode Consortium has on how -# ISO/IEC 8859-9:1999 characters map into Unicode. -# -# Format: Three tab-separated columns -# Column #1 is the ISO/IEC 8859-9 code (in hex as 0xXX) -# Column #2 is the Unicode (in hex as 0xXXXX) -# Column #3 the Unicode name (follows a comment sign, '#') -# -# The entries are in ISO/IEC 8859-9 order. -# -# ISO/IEC 8859-9 is also equivalent to ISO-IR-148. -# -# Version history -# 1.0 version updates 0.1 version by adding mappings for all -# control characters. -# -# Updated versions of this file may be found in: -# -# -# Any comments or problems, contact -# Please note that is an archival address; -# notices will be checked, but do not expect an immediate response. -# -0x00 0x0000 # NULL -0x01 0x0001 # START OF HEADING -0x02 0x0002 # START OF TEXT -0x03 0x0003 # END OF TEXT -0x04 0x0004 # END OF TRANSMISSION -0x05 0x0005 # ENQUIRY -0x06 0x0006 # ACKNOWLEDGE -0x07 0x0007 # BELL -0x08 0x0008 # BACKSPACE -0x09 0x0009 # HORIZONTAL TABULATION -0x0A 0x000A # LINE FEED -0x0B 0x000B # VERTICAL TABULATION -0x0C 0x000C # FORM FEED -0x0D 0x000D # CARRIAGE RETURN -0x0E 0x000E # SHIFT OUT -0x0F 0x000F # SHIFT IN -0x10 0x0010 # DATA LINK ESCAPE -0x11 0x0011 # DEVICE CONTROL ONE -0x12 0x0012 # DEVICE CONTROL TWO -0x13 0x0013 # DEVICE CONTROL THREE -0x14 0x0014 # DEVICE CONTROL FOUR -0x15 0x0015 # NEGATIVE ACKNOWLEDGE -0x16 0x0016 # SYNCHRONOUS IDLE -0x17 0x0017 # END OF TRANSMISSION BLOCK -0x18 0x0018 # CANCEL -0x19 0x0019 # END OF MEDIUM -0x1A 0x001A # SUBSTITUTE -0x1B 0x001B # ESCAPE -0x1C 0x001C # FILE SEPARATOR -0x1D 0x001D # GROUP SEPARATOR -0x1E 0x001E # RECORD SEPARATOR -0x1F 0x001F # UNIT SEPARATOR -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # DELETE -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x00A1 # INVERTED EXCLAMATION MARK -0xA2 0x00A2 # CENT SIGN -0xA3 0x00A3 # POUND SIGN -0xA4 0x00A4 # CURRENCY SIGN -0xA5 0x00A5 # YEN SIGN -0xA6 0x00A6 # BROKEN BAR -0xA7 0x00A7 # SECTION SIGN -0xA8 0x00A8 # DIAERESIS -0xA9 0x00A9 # COPYRIGHT SIGN -0xAA 0x00AA # FEMININE ORDINAL INDICATOR -0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC # NOT SIGN -0xAD 0x00AD # SOFT HYPHEN -0xAE 0x00AE # REGISTERED SIGN -0xAF 0x00AF # MACRON -0xB0 0x00B0 # DEGREE SIGN -0xB1 0x00B1 # PLUS-MINUS SIGN -0xB2 0x00B2 # SUPERSCRIPT TWO -0xB3 0x00B3 # SUPERSCRIPT THREE -0xB4 0x00B4 # ACUTE ACCENT -0xB5 0x00B5 # MICRO SIGN -0xB6 0x00B6 # PILCROW SIGN -0xB7 0x00B7 # MIDDLE DOT -0xB8 0x00B8 # CEDILLA -0xB9 0x00B9 # SUPERSCRIPT ONE -0xBA 0x00BA # MASCULINE ORDINAL INDICATOR -0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x00BC # VULGAR FRACTION ONE QUARTER -0xBD 0x00BD # VULGAR FRACTION ONE HALF -0xBE 0x00BE # VULGAR FRACTION THREE QUARTERS -0xBF 0x00BF # INVERTED QUESTION MARK -0xC0 0x00C0 # LATIN CAPITAL LETTER A WITH GRAVE -0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC3 0x00C3 # LATIN CAPITAL LETTER A WITH TILDE -0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE -0xC6 0x00C6 # LATIN CAPITAL LETTER AE -0xC7 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA -0xC8 0x00C8 # LATIN CAPITAL LETTER E WITH GRAVE -0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX -0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x00CC # LATIN CAPITAL LETTER I WITH GRAVE -0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x00CF # LATIN CAPITAL LETTER I WITH DIAERESIS -0xD0 0x011E # LATIN CAPITAL LETTER G WITH BREVE -0xD1 0x00D1 # LATIN CAPITAL LETTER N WITH TILDE -0xD2 0x00D2 # LATIN CAPITAL LETTER O WITH GRAVE -0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX -0xD5 0x00D5 # LATIN CAPITAL LETTER O WITH TILDE -0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x00D7 # MULTIPLICATION SIGN -0xD8 0x00D8 # LATIN CAPITAL LETTER O WITH STROKE -0xD9 0x00D9 # LATIN CAPITAL LETTER U WITH GRAVE -0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX -0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x0130 # LATIN CAPITAL LETTER I WITH DOT ABOVE -0xDE 0x015E # LATIN CAPITAL LETTER S WITH CEDILLA -0xDF 0x00DF # LATIN SMALL LETTER SHARP S -0xE0 0x00E0 # LATIN SMALL LETTER A WITH GRAVE -0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE3 0x00E3 # LATIN SMALL LETTER A WITH TILDE -0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x00E5 # LATIN SMALL LETTER A WITH RING ABOVE -0xE6 0x00E6 # LATIN SMALL LETTER AE -0xE7 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA -0xE8 0x00E8 # LATIN SMALL LETTER E WITH GRAVE -0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE -0xEA 0x00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX -0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x00EC # LATIN SMALL LETTER I WITH GRAVE -0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x00EF # LATIN SMALL LETTER I WITH DIAERESIS -0xF0 0x011F # LATIN SMALL LETTER G WITH BREVE -0xF1 0x00F1 # LATIN SMALL LETTER N WITH TILDE -0xF2 0x00F2 # LATIN SMALL LETTER O WITH GRAVE -0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x00F5 # LATIN SMALL LETTER O WITH TILDE -0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x00F7 # DIVISION SIGN -0xF8 0x00F8 # LATIN SMALL LETTER O WITH STROKE -0xF9 0x00F9 # LATIN SMALL LETTER U WITH GRAVE -0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE -0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX -0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x0131 # LATIN SMALL LETTER DOTLESS I -0xFE 0x015F # LATIN SMALL LETTER S WITH CEDILLA -0xFF 0x00FF # LATIN SMALL LETTER Y WITH DIAERESIS - - diff --git a/program/lib/utf8.class.php b/program/lib/utf8.class.php deleted file mode 100644 index 3371c25..0000000 --- a/program/lib/utf8.class.php +++ /dev/null @@ -1,180 +0,0 @@ -loadCharset(CP1252); - Then call - $res = $utfConverter->strToUtf8($str); - or - $res = $utfConverter->utf8ToStr($utf); - to get the needed encoding. ---------------------------------------------------------------------------------- -Note: - Rewrite or Override the onError method if needed. It's the error handler used from everywhere and takes 2 parameters: - err_code and err_text. By default it just prints out a message about the error. -*/ - -// Charset maps -// Adapted to fit RoundCube -define("UTF8_MAP_DIR", "program/lib/encoding"); -$utf8_maps = array( - "CP1250" => UTF8_MAP_DIR . "/CP1250.map", - "CP1251" => UTF8_MAP_DIR . "/CP1251.map", - "CP1252" => UTF8_MAP_DIR . "/CP1252.map", - "CP1253" => UTF8_MAP_DIR . "/CP1253.map", - "CP1254" => UTF8_MAP_DIR . "/CP1254.map", - "CP1255" => UTF8_MAP_DIR . "/CP1255.map", - "CP1256" => UTF8_MAP_DIR . "/CP1256.map", - "CP1257" => UTF8_MAP_DIR . "/CP1257.map", - "CP1258" => UTF8_MAP_DIR . "/CP1258.map", - "ISO-8859-1" => UTF8_MAP_DIR . "/ISO-8859-1.map", - "ISO-8859-2" => UTF8_MAP_DIR . "/ISO-8859-2.map", - "ISO-8859-3" => UTF8_MAP_DIR . "/ISO-8859-3.map", - "ISO-8859-4" => UTF8_MAP_DIR . "/ISO-8859-4.map", - "ISO-8859-5" => UTF8_MAP_DIR . "/ISO-8859-5.map", - "ISO-8859-6" => UTF8_MAP_DIR . "/ISO-8859-6.map", - "ISO-8859-7" => UTF8_MAP_DIR . "/ISO-8859-7.map", - "ISO-8859-8" => UTF8_MAP_DIR . "/ISO-8859-8.map", - "ISO-8859-9" => UTF8_MAP_DIR . "/ISO-8859-9.map" - ); - -//Error constants -define("ERR_OPEN_MAP_FILE","ERR_OPEN_MAP_FILE"); - -//Class definition -Class utf8{ - - var $charset = "ISO-8859-1"; - var $ascMap = array(); - var $utfMap = array(); - - // made PHP5 capable by RoundCube - function __construct($charset="ISO-8859-1"){ - $this->loadCharset($charset); - } - - //Constructor - function utf8($charset="ISO-8859-1"){ - $this->__construct($charset); - } - - //Load charset - function loadCharset($charset){ - global $utf8_maps; - - if (!is_file($utf8_maps[$charset])) - { - $this->onError(ERR_OPEN_MAP_FILE, "Failed to open map file for $charset"); - return; - } - - if (empty($this->ascMap[$charset])) - { - $lines = file_get_contents($utf8_maps[$charset]); - $lines = preg_replace("/#.*$/m","",$lines); - $lines = preg_replace("/\n\n/","",$lines); - $lines = explode("\n",$lines); - foreach($lines as $line){ - $parts = explode('0x',$line); - if(count($parts)==3){ - $asc=hexdec(substr($parts[1],0,2)); - $utf=hexdec(substr($parts[2],0,4)); - $this->ascMap[$charset][$asc]=$utf; - } - } - } - - $this->charset = $charset; - $this->utfMap = array_flip($this->ascMap[$charset]); - } - - //Error handler - function onError($err_code,$err_text){ - //print($err_code . " : " . $err_text . "
\n"); - raise_error(array('code' => 500, - 'file' => __FILE__, - 'message' => $err_text), TRUE, FALSE); - } - - //Translate string ($str) to UTF-8 from given charset - function strToUtf8($str){ - $chars = unpack('C*', $str); - $cnt = count($chars); - for($i=1;$i<=$cnt;$i++) $this->_charToUtf8($chars[$i]); - return implode("",$chars); - } - - //Translate UTF-8 string to single byte string in the given charset - function utf8ToStr($utf){ - $chars = unpack('C*', $utf); - $cnt = count($chars); - $res = ""; //No simple way to do it in place... concatenate char by char - for ($i=1;$i<=$cnt;$i++){ - $res .= $this->_utf8ToChar($chars, $i); - } - return $res; - } - - //Char to UTF-8 sequence - function _charToUtf8(&$char){ - $c = (int)$this->ascMap[$this->charset][$char]; - if ($c < 0x80){ - $char = chr($c); - } - else if($c<0x800) // 2 bytes - $char = (chr(0xC0 | $c>>6) . chr(0x80 | $c & 0x3F)); - else if($c<0x10000) // 3 bytes - $char = (chr(0xE0 | $c>>12) . chr(0x80 | $c>>6 & 0x3F) . chr(0x80 | $c & 0x3F)); - else if($c<0x200000) // 4 bytes - $char = (chr(0xF0 | $c>>18) . chr(0x80 | $c>>12 & 0x3F) . chr(0x80 | $c>>6 & 0x3F) . chr(0x80 | $c & 0x3F)); - } - - //UTF-8 sequence to single byte character - function _utf8ToChar(&$chars, &$idx){ - if(($chars[$idx] >= 240) && ($chars[$idx] <= 255)){ // 4 bytes - $utf = (intval($chars[$idx]-240) << 18) + - (intval($chars[++$idx]-128) << 12) + - (intval($chars[++$idx]-128) << 6) + - (intval($chars[++$idx]-128) << 0); - } - else if (($chars[$idx] >= 224) && ($chars[$idx] <= 239)){ // 3 bytes - $utf = (intval($chars[$idx]-224) << 12) + - (intval($chars[++$idx]-128) << 6) + - (intval($chars[++$idx]-128) << 0); - } - else if (($chars[$idx] >= 192) && ($chars[$idx] <= 223)){ // 2 bytes - $utf = (intval($chars[$idx]-192) << 6) + - (intval($chars[++$idx]-128) << 0); - } - else{ // 1 byte - $utf = $chars[$idx]; - } - if(array_key_exists($utf,$this->utfMap)) - return chr($this->utfMap[$utf]); - else - return "?"; - } - -} - -?> \ No newline at end of file diff --git a/program/localization/el/labels.inc b/program/localization/el/labels.inc new file mode 100755 index 0000000..cdfee08 --- /dev/null +++ b/program/localization/el/labels.inc @@ -0,0 +1,181 @@ + | + | John Economou | + +-----------------------------------------------------------------------+ + + @version $Id: labels.inc 619 2007-06-13 07:09:09Z thomasb $ + +*/ + +$labels = array(); +$labels['welcome'] = 'Καλώς ήρθατε στο $product'; +$labels['username'] = 'Όνομα Χρήστη'; +$labels['password'] = 'Κωδικός Πρόσβασης'; +$labels['server'] = 'Διακομιστής'; +$labels['login'] = 'Είσοδος'; +$labels['logout'] = 'Έξοδος'; +$labels['mail'] = 'E-Mail'; +$labels['settings'] = 'Προσωπικές Ρυθμίσεις'; +$labels['addressbook'] = 'Βιβλίο Διευθύνσεων'; +$labels['inbox'] = 'Εισερχόμενα'; +$labels['drafts'] = 'Πρόχειρα'; +$labels['sent'] = 'Απεσταλμένα'; +$labels['trash'] = 'Κάδος'; +$labels['junk'] = 'Junk'; +$labels['subject'] = 'Θέμα'; +$labels['from'] = 'Αποστολέας'; +$labels['to'] = 'Παραλήπτης'; +$labels['cc'] = 'Αντίγραφο'; +$labels['bcc'] = 'Bcc'; +$labels['replyto'] = 'Απάντηση σε'; +$labels['date'] = 'Ημ/νία'; +$labels['size'] = 'Μέγεθος'; +$labels['priority'] = 'Πρoτεραιότητα'; +$labels['organization'] = 'Οργανισμός'; +$labels['reply-to'] = 'Απάντηση σε'; +$labels['mailboxlist'] = 'Φάκελοι'; +$labels['messagesfromto'] = 'Μηνύματα $from από $to έως $count'; +$labels['messagenrof'] = 'Μήνυμα $nr από $count'; +$labels['moveto'] = 'μετακίνηση σε...'; +$labels['download'] = 'κατέβασμα'; +$labels['filename'] = 'Όνομα αρχείου'; +$labels['filesize'] = 'Μέγεθος αρχείου'; +$labels['preferhtml'] = 'Προτίμηση HTML'; +$labels['htmlmessage'] = 'Μήνυμα HTML'; +$labels['prettydate'] = 'Όμορφη ημ/νία'; +$labels['addtoaddressbook'] = 'Προσθήκη στο Βιβλίο Διευθύνσεων'; +$labels['sun'] = 'Κυρ'; +$labels['mon'] = 'Δευτ'; +$labels['tue'] = 'Τρι'; +$labels['wed'] = 'Τετ'; +$labels['thu'] = 'Πεμ'; +$labels['fri'] = 'Παρ'; +$labels['sat'] = 'Σαβ'; +$labels['sunday'] = 'Κυριακή'; +$labels['monday'] = 'Δευτέρα'; +$labels['tuesday'] = 'Τρίτη'; +$labels['wednesday'] = 'Τετάρτη'; +$labels['thursday'] = 'Πέμπτη'; +$labels['friday'] = 'Παρασκευή'; +$labels['saturday'] = 'Σάββατο'; +$labels['today'] = 'Σήμερα'; +$labels['checkmail'] = 'Έλεγχος για νέα μηνύματα'; +$labels['writenewmessage'] = 'Δημιουργία νέου μηνύματος'; +$labels['replytomessage'] = 'Απάντηση'; +$labels['replytoallmessage'] = 'Απάντηση στον αποστολέα και όλους τους παραλήπτες'; +$labels['forwardmessage'] = 'Προώθηση μηνύματος'; +$labels['deletemessage'] = 'Μετακίνηση στον Κάδο'; +$labels['printmessage'] = 'Εκτύπωση'; +$labels['previousmessage'] = 'Εμφάνιση προηγούμενου μηνύματος'; +$labels['previousmessages'] = 'Εμφάνιση προηγούμενης ομάδας μηνυμάτων'; +$labels['firstmessage'] = 'Εμφάνιση πρώτου μυνήματος'; +$labels['firstmessages'] = 'Εμφάνιση πρώτης ομάδας μηνυμάτων'; +$labels['nextmessage'] = 'Εμφάνιση επόμενου μηνύματος'; +$labels['nextmessages'] = 'Εμφάνιση επόμενης ομάδας μηνυμάτων'; +$labels['lastmessage'] = 'Εμφάνιση τελευταίου μηνύματος'; +$labels['lastmessages'] = 'Εμφάνιση τελευταίας ομάδας μηνυμάτων'; +$labels['backtolist'] = 'Επιστροφή στη λίστα μηνυμάτων'; +$labels['viewsource'] = 'Προβολή πηγαίου κώδικα'; +$labels['select'] = 'Επιλογή'; +$labels['all'] = 'Όλα'; +$labels['none'] = 'Κανένα'; +$labels['unread'] = 'Μη αναγνωσμένα'; +$labels['compact'] = 'Συμπίεση'; +$labels['empty'] = '’δειασμα'; +$labels['purge'] = 'Καθάρισμα'; +$labels['quota'] = 'Χρήση δίσκου'; +$labels['unknown'] = 'άγνωστο'; +$labels['unlimited'] = 'απεριόριστο'; +$labels['quicksearch'] = 'Γρήγορη Εύρεση'; +$labels['resetsearch'] = 'Επαναφορά Εύρεσης'; +$labels['compose'] = 'Συγγραφή μηνύματος'; +$labels['sendmessage'] = 'Αποστολή μηνύματος τώρα'; +$labels['savemessage'] = 'Αποθήκευση ως πρόχειρου'; +$labels['addattachment'] = 'Επισύναψη αρχείου'; +$labels['charset'] = 'Charset'; +$labels['editortype'] = 'Είδος επεξεργαστή κειμένου'; +$labels['returnreceipt'] = 'Αναφορά Παράδοσης'; +$labels['checkspelling'] = 'Έλεγχος ορθογραφίας'; +$labels['resumeediting'] = 'Συνέχιση επεξεργασίας'; +$labels['revertto'] = 'Επαναφορά σε'; +$labels['attachments'] = 'Επισυνημένα'; +$labels['upload'] = 'Ανέβασμα'; +$labels['close'] = 'Κλείσιμο'; +$labels['low'] = 'Χαμηλή'; +$labels['lowest'] = 'Χαμηλότερη'; +$labels['normal'] = 'Κανονική'; +$labels['high'] = 'Υψηλή'; +$labels['highest'] = 'Υψηλότερη'; +$labels['nosubject'] = '(κανένα θέμα)'; +$labels['showimages'] = 'Εμφάνιση εικόνων'; +$labels['htmltoggle'] = 'HTML'; +$labels['plaintoggle'] = 'Απλό κείμενο'; +$labels['name'] = 'Εμφανιζόμενο όνομα'; +$labels['firstname'] = 'Όνομα'; +$labels['surname'] = 'Επώνυμο'; +$labels['email'] = 'E-Mail'; +$labels['addcontact'] = 'Προσθήκη επιλεγμένης επαφής στο Βιβλίο Διευθύνσεων'; +$labels['editcontact'] = 'Επεξεργασία επαφής'; +$labels['edit'] = 'Επεξεργασία'; +$labels['cancel'] = 'Ακύρωση'; +$labels['save'] = 'Αποθήκευση'; +$labels['delete'] = 'Διαγραφή'; +$labels['newcontact'] = 'Δημιουργία νέας καρτέλας επαφής'; +$labels['deletecontact'] = 'Διαγραφή επιλεγμένων επαφών'; +$labels['composeto'] = 'Σύνθεση μηνύματος προς'; +$labels['contactsfromto'] = 'Επαφή $from από $to έως $count'; +$labels['print'] = 'Εκτύπωση'; +$labels['export'] = 'Εξαγωγή'; +$labels['previouspage'] = 'Εμφάνιση προηγούμενης σελίδας'; +$labels['firstpage'] = 'Εμφάνιση πρώτης σελίδας'; +$labels['nextpage'] = 'Εμφάνιση επόμενης σελίδας'; +$labels['lastpage'] = 'Εμφάνιση τελευταίας σελίδας'; +$labels['groups'] = 'Ομάδες'; +$labels['personaladrbook'] = 'Προσωπικό Βιβλίο Διευθύνσεων'; +$labels['settingsfor'] = 'Ρυθμίσεις για'; +$labels['preferences'] = 'Προτιμήσεις'; +$labels['userpreferences'] = 'Προτιμήσεις χρήστη'; +$labels['editpreferences'] = 'Επεξεργασία προτιμήσεων χρήστη'; +$labels['identities'] = 'Ταυτότητες'; +$labels['manageidentities'] = 'Διαχείριση ταυτοτήτων για το λογαριασμό αυτό'; +$labels['newidentity'] = 'Νέα ταυτότητα'; +$labels['newitem'] = 'Νέο αντικείμενο'; +$labels['edititem'] = 'Επεξεργασία αντικειμένου'; +$labels['setdefault'] = 'Ορισμός ως προεπιλογή'; +$labels['language'] = 'Γλώσσα'; +$labels['timezone'] = 'Περιοχή ώρας'; +$labels['pagesize'] = 'Γραμμές ανά σελίδα'; +$labels['signature'] = 'Υπογραφή'; +$labels['dstactive'] = 'Daylight savings'; +$labels['htmleditor'] = 'Σύνθεση HTML μηνύματος'; +$labels['htmlsignature'] = 'Υπογραφή HTML'; +$labels['previewpane'] = 'Εμφάνιση προηγούμενου παραθύρου'; +$labels['autosavedraft'] = 'Αυτόματη προχείρου'; +$labels['everynminutes'] = 'κάθε $n λεπτά'; +$labels['never'] = 'ποτέ'; +$labels['folder'] = 'Φάκελος'; +$labels['folders'] = 'Φάκελοι'; +$labels['foldername'] = 'Όνομα φακέλου'; +$labels['subscribed'] = 'Εγγραφή'; +$labels['create'] = 'Δημιουργία'; +$labels['createfolder'] = 'Δημιουργία νέου φακέλου'; +$labels['rename'] = 'Μετονομασία'; +$labels['renamefolder'] = 'Μετονομασία φακέλου'; +$labels['deletefolder'] = 'Διαγραφή φακέλου'; +$labels['managefolders'] = 'Διαχείριση φακέλων'; +$labels['sortby'] = 'Ταξινόμηση κατά'; +$labels['sortasc'] = 'Αύξουσα ταξινόμηση'; +$labels['sortdesc'] = 'Φθίνουσα ταξινόμηση'; + +?> \ No newline at end of file diff --git a/program/localization/el/messages.inc b/program/localization/el/messages.inc new file mode 100755 index 0000000..a5fb405 --- /dev/null +++ b/program/localization/el/messages.inc @@ -0,0 +1,78 @@ + | + | John Economou | + +-----------------------------------------------------------------------+ + + @version $Id: messages.inc 619 2007-06-13 07:09:09Z thomasb $ + +*/ + +$messages = array(); +$messages['loginfailed'] = 'Είσοδος Απέτυχε'; +$messages['cookiesdisabled'] = 'Ο περιηγητής σας (browser) δεν αποδέχεται cookies'; +$messages['sessionerror'] = 'Η συνεδρία σας είναι άκυρη ή έχει λήξη'; +$messages['imaperror'] = 'Η σύνδεση με το διακομιστή IMAP απέτυχε'; +$messages['nomessagesfound'] = 'Δε βρέθηκαν μηνύματα σε αυτή τη θυρίδα'; +$messages['loggedout'] = 'Έχετε τερματίσει επιτυχώς τη συνεδρία. Αντίο!'; +$messages['mailboxempty'] = 'Η θυρίδα είναι άδεια'; +$messages['loading'] = 'Φόρτωση...'; +$messages['loadingdata'] = 'Φόρτωση δεδομένων...'; +$messages['checkingmail'] = 'Έλεγχος για νέα μηνύματα...'; +$messages['sendingmessage'] = 'Αποστολή μηνύματος...'; +$messages['messagesent'] = 'Μήνυμα εστάλη επιτυχώς'; +$messages['savingmessage'] = 'Αποθήκευση μηνύματος...'; +$messages['messagesaved'] = 'Μήνυμα αποθηκεύτηκε στα Πρόχειρα'; +$messages['successfullysaved'] = 'Αποθηκεύτηκε επιτυχώς'; +$messages['addedsuccessfully'] = 'Η επαφή προστέθηκε επιτυχώς στο Βιβλίο Διευθύνσεων'; +$messages['contactexists'] = 'Υπάρχει ήδη επαφή με αυτή τη διεύθυνση e-mail'; +$messages['blockedimages'] = 'Για να προστατευτεί το απόρρητο σας, οι απομακρυσμένες εικόνες έχουν απενεργοποιηθεί σε αυτό το μήνυμα.'; +$messages['encryptedmessage'] = 'Αυτό το μήνυμα είναι κρυπτογραφημένο και δε μπορεί να προβληθεί. Συγνώμη!'; +$messages['nocontactsfound'] = 'Δε βρέθηκαν επαφές'; +$messages['contactnotfound'] = 'Η ζητούμενη επαφή δεν βρέθηκε'; +$messages['sendingfailed'] = 'Αποστολή μηνύματος απέτυχε'; +$messages['errorsaving'] = 'Παρουσιάστηκε σφάλμα κατά την αποθήκευση'; +$messages['errormoving'] = 'Το μήνυμα δε μπορούσε να μετακινηθεί'; +$messages['errordeleting'] = 'Το μήνυμα δε μπορούσε να διαγραφεί'; +$messages['deletecontactconfirm'] = 'Θέλετε να διαγράψετε τη συγκεκριμένη επαφή/ές;'; +$messages['deletemessagesconfirm'] = 'Θέλετε να διαγράψετε το συγκεκριμένο μήνυμα/τα;'; +$messages['deletefolderconfirm'] = 'Θέλετε να διαγράψετε το συγκεκριμένο φάκελο;'; +$messages['purgefolderconfirm'] = 'Θέλετε να διαγράψετε όλα τα μηνύματα στο συγκεκριμένο φάκελο;'; +$messages['formincomplete'] = 'Η φόρμα δεν έχει συμπληρωθεί πλήρως'; +$messages['noemailwarning'] = 'Παρακαλώ εισάγεται έγκυρη διεύθυνση email'; +$messages['nonamewarning'] = 'Παρακαλώ εισάγεται όνομα'; +$messages['nopagesizewarning'] = 'Παρακαλώ εισάγεται μέγεθος σελίδας'; +$messages['norecipientwarning'] = 'Παρακαλώ εισάγεται τουλάχιστον έναν παραλήπτη'; +$messages['nosubjectwarning'] = 'Το πεδίο "Θέμα" είναι άδειο. Θέλετε να εισάγεται ένα τώρα;'; +$messages['nobodywarning'] = 'Αποστολή μηνύματος χωρίς κείμενο;'; +$messages['notsentwarning'] = 'Το μήνυμα δεν έχει σταλεί. Θέλετε να το απορρίψετε;'; +$messages['noldapserver'] = 'Παρακαλώ επιλέξτε έναν LDAP διακομιστή για αναζήτηση'; +$messages['nocontactsreturned'] = 'Δε βρέθηκαν επαφές'; +$messages['nosearchname'] = 'Παρακαλώ εισάγεται όνομα επαφής ή διεύθυνση email'; +$messages['searchsuccessful'] = '$nr μηνύματα βρέθηκαν'; +$messages['searchnomatch'] = 'Η Εύρεση δεν επέστρεψε αποτελέσματα'; +$messages['searching'] = 'Εύρεση...'; +$messages['checking'] = 'Έλεγχος...'; +$messages['nospellerrors'] = 'Δε βρέθηκαν ορθογραφικά λάθη'; +$messages['folderdeleted'] = 'Ο φάκελος διαγράφηκε επιτυχώς'; +$messages['deletedsuccessfully'] = 'Διαγραφή Επιτυχώς'; +$messages['converting'] = 'Μετακίνηση διαμορφώσεων κειμένου...'; +$messages['messageopenerror'] = 'Φόρτωση μηνυμάτων από τον διακομιστή απέτυχε'; +$messages['fileuploaderror'] = 'Ανέβασμα αρχείου απέτυχε'; +$messages['filesizeerror'] = 'Το ανεβασμένο αρχείο ξεπερνάει το μέγιστο μέγεθος των $size'; +$messages['copysuccess'] = 'Επιτυχή αντιγραφή $nr διευθύνσεων'; +$messages['copyerror'] = 'Αποτυχία αντιγραφής διευθύνσεων'; +$messages['sourceisreadonly'] = 'Η διεύθυνση έχει μόνο δικαίωμα ανάγνωσης'; +$messages['errorsavingcontact'] = 'Σώσιμο επαφής απέτυχε'; + +?> \ No newline at end of file diff --git a/program/localization/eu/labels.inc b/program/localization/eu/labels.inc new file mode 100644 index 0000000..35552ca --- /dev/null +++ b/program/localization/eu/labels.inc @@ -0,0 +1,184 @@ + | + +-----------------------------------------------------------------------+ + + $Id: labels.inc 549 2007-05-01 18:53:56Z thomasb $ + +*/ + +$labels = array(); +$labels['welcome'] = 'Ongietorri Roundcube|Mail-era'; +$labels['username'] = 'Erabiltzailea'; +$labels['password'] = 'Pasahitza'; +$labels['server'] = 'Zerbitzaria'; +$labels['login'] = 'Saio hasiera'; +$labels['logout'] = 'Irten'; +$labels['mail'] = 'ePosta'; +$labels['settings'] = 'Ezarpen Pertsonalak'; +$labels['addressbook'] = 'Helbide Liburua'; +$labels['inbox'] = 'Sarrera'; +$labels['drafts'] = 'Zirriborroak'; +$labels['sent'] = 'Bidalitakoak'; +$labels['trash'] = 'Zakarrontzia'; +$labels['junk'] = 'Zabor-posta'; +$labels['subject'] = 'Gaia'; +$labels['from'] = 'Nork'; +$labels['to'] = 'Nori'; +$labels['cc'] = 'Kopia'; +$labels['bcc'] = 'Bcc'; +$labels['replyto'] = 'Erantzun-Hona'; +$labels['date'] = 'Data'; +$labels['size'] = 'Tamaina'; +$labels['priority'] = 'Lehentasuna'; +$labels['organization'] = 'Erakundea'; +$labels['reply-to'] = 'Erantzun-Hona'; +$labels['mailboxlist'] = 'Karpetak'; +$labels['messagesfromto'] = '$from -tik $to -ra $count mezuetatik'; +$labels['messagenrof'] = '$nr mezua $count -tik'; +$labels['moveto'] = 'mugitu hona...'; +$labels['download'] = 'deskargatu'; +$labels['filename'] = 'Fitxategi Izena'; +$labels['filesize'] = 'Fitxategi Tamaina'; +$labels['preferhtml'] = 'HTML nahiago'; +$labels['htmlmessage'] = 'HTML Mezua'; +$labels['prettydate'] = 'Data politak'; +$labels['addtoaddressbook'] = 'Helbide liburura gehitu'; +$labels['sun'] = 'Iga'; +$labels['mon'] = 'Al'; +$labels['tue'] = 'As'; +$labels['wed'] = 'Azt'; +$labels['thu'] = 'Og'; +$labels['fri'] = 'Or'; +$labels['sat'] = 'Lar'; +$labels['sunday'] = 'Igandea'; +$labels['monday'] = 'Astelehena'; +$labels['tuesday'] = 'Asteartea'; +$labels['wednesday'] = 'Asteazkena'; +$labels['thursday'] = 'Osteguna'; +$labels['friday'] = 'Ostirala'; +$labels['saturday'] = 'Larunbata'; +$labels['today'] = 'Gaur'; +$labels['checkmail'] = 'Mezu berrien bila arakatu'; +$labels['writenewmessage'] = 'Mezu berri bat sortu'; +$labels['replytomessage'] = 'Mezuari erantzun'; +$labels['replytoallmessage'] = 'Bidaltzaile eta hartzaile guztiei erantzun'; +$labels['forwardmessage'] = 'Mezua Birbidali'; +$labels['deletemessage'] = 'Mezua zakarrontzira mugitu'; +$labels['printmessage'] = 'Mezu hau inprimatu'; +$labels['previousmessage'] = 'Aurreko mezua ikusi'; +$labels['previousmessages'] = 'Aurreko mezuak ikusi'; +$labels['firstmessage'] = 'Lehenengo mezua ikusi'; +$labels['firstmessages'] = 'Lehenengo mezu sorta ikusi'; +$labels['nextmessage'] = 'Hurrengo mezua ikusi'; +$labels['nextmessages'] = 'Hurrengo mezu sorta ikusi'; +$labels['lastmessage'] = 'Azken mezua ikusi'; +$labels['lastmessages'] = 'Azken mezu sorta ikusi'; +$labels['backtolist'] = 'Mezu zerrendara itzuli'; +$labels['viewsource'] = 'Jatorria bistarazi'; +$labels['select'] = 'Hautatu'; +$labels['all'] = 'Denak'; +$labels['none'] = 'Batez'; +$labels['unread'] = 'Irakurri gabeak'; +$labels['compact'] = 'Trinkotu'; +$labels['empty'] = 'Hustu'; +$labels['purge'] = 'Garbitu'; +$labels['quota'] = 'Disko erabilera'; +$labels['unknown'] = 'ezezaguna'; +$labels['unlimited'] = 'mugagabea'; +$labels['quicksearch'] = 'Bilaketa azkarra'; +$labels['resetsearch'] = 'Bilaketa berrabiarazi'; +$labels['compose'] = 'Mezu bat sortu'; +$labels['sendmessage'] = 'Mezua orain bidali'; +$labels['savemessage'] = 'Zirriborro hau gorde'; +$labels['addattachment'] = 'Fitxategia erantsi'; +$labels['charset'] = 'Karaktere jokoa'; +$labels['editortype'] = 'Editore mota'; +$labels['returnreceipt'] = 'Bidaltzaileari itzuli'; +$labels['checkspelling'] = 'Egiaztaketa ortografikoa'; +$labels['resumeediting'] = 'Editatzen jarraitu'; +$labels['revertto'] = 'Itzuli hona'; +$labels['attachments'] = 'Eranskinak'; +$labels['upload'] = 'Igo'; +$labels['close'] = 'Itxi'; +$labels['low'] = 'Baxua'; +$labels['lowest'] = 'Baxuena'; +$labels['normal'] = 'Normala'; +$labels['high'] = 'Altua'; +$labels['highest'] = 'Altuena'; +$labels['nosubject'] = '(gairik gabea)'; +$labels['showimages'] = 'Irudiak bistarazi'; +$labels['htmltoggle'] = 'HTML'; +$labels['plaintoggle'] = 'Testu laua'; +$labels['name'] = 'Izena bistarazi'; +$labels['firstname'] = 'Izena'; +$labels['surname'] = 'Abizena'; +$labels['email'] = 'ePosta'; +$labels['addcontact'] = 'Txartel berria gehitu'; +$labels['editcontact'] = 'Txartela editatu'; +$labels['edit'] = 'Editatu'; +$labels['cancel'] = 'Utzi'; +$labels['save'] = 'Gorde'; +$labels['delete'] = 'Ezabatu'; +$labels['newcontact'] = 'Helbide liburu txartel berria sortu'; +$labels['deletecontact'] = 'Aukeraturiko txartelak ezabatu'; +$labels['composeto'] = 'Bidali mezua honi: '; +$labels['contactsfromto'] = '$from -tik $to -ra $count txarteletatik'; +$labels['print'] = 'Inprimatu'; +$labels['export'] = 'Esportatu'; +$labels['previouspage'] = 'Aurreko sorta ikusi'; +$labels['firstpage'] = 'Lehenengo sorta ikusi'; +$labels['nextpage'] = 'Hurrengo sorta ikusi'; +$labels['lastpage'] = 'Azken sorta ikusi'; +$labels['ldapsearch'] = 'LDAP direktorio bilaketa'; +$labels['ldappublicsearchname'] = 'Harremanetarako izena'; +$labels['ldappublicsearchtype'] = 'Parekatze zehatza?'; +$labels['ldappublicserverselect'] = 'Zerbitzariak hautatu'; +$labels['ldappublicsearchfield'] = 'Bilatu hemen'; +$labels['ldappublicsearchform'] = 'Kontaktu bat bilatu'; +$labels['ldappublicsearch'] = 'Bilatu'; +$labels['settingsfor'] = 'Honen ezarpenak:'; +$labels['preferences'] = 'Hobespenak'; +$labels['userpreferences'] = 'Erabiltzaile hobespenak'; +$labels['editpreferences'] = 'Erabiltzaile hobespenak editatu'; +$labels['identities'] = 'Identitateak'; +$labels['manageidentities'] = 'Kontu honetako identitateak kudeatu'; +$labels['newidentity'] = 'Identitate berria'; +$labels['newitem'] = 'Elementu berria'; +$labels['edititem'] = 'Elementua Editatu'; +$labels['setdefault'] = 'Lehenespenak ezarri'; +$labels['language'] = 'Hizkuntza'; +$labels['timezone'] = 'Ordu zonaldea'; +$labels['pagesize'] = 'Lerro orrialdeko'; +$labels['signature'] = 'Sinadura'; +$labels['dstactive'] = 'Eguneko gordeketak'; +$labels['htmleditor'] = 'HTML mezuak sortu'; +$labels['htmlsignature'] = 'HTML sinadura'; +$labels['previewpane'] = 'Aurrebista panela ikusi'; +$labels['autosavedraft'] = 'Zirriborroa automatikoki gorde'; +$labels['everynminutes'] = '$n minuturo'; +$labels['never'] = 'inoiz'; +$labels['folder'] = 'Karpeta'; +$labels['folders'] = 'Karpetak'; +$labels['foldername'] = 'Karpeta izena'; +$labels['subscribed'] = 'Harpideturik'; +$labels['create'] = 'Sortu'; +$labels['createfolder'] = 'Karpeta berria sortu'; +$labels['rename'] = 'Berrizendatu'; +$labels['renamefolder'] = 'Karpeta berrizendatu'; +$labels['deletefolder'] = 'Karpeta ezabatu'; +$labels['managefolders'] = 'Karpeta kudeaketa'; +$labels['sortby'] = 'Honela ordenatu'; +$labels['sortasc'] = 'Goraka ordenatu'; +$labels['sortdesc'] = 'Beheraka ordenatu'; + +?> \ No newline at end of file diff --git a/program/localization/eu/messages.inc b/program/localization/eu/messages.inc new file mode 100644 index 0000000..3705884 --- /dev/null +++ b/program/localization/eu/messages.inc @@ -0,0 +1,71 @@ + | + +-----------------------------------------------------------------------+ + + $Id: messages.inc 549 2007-05-01 18:53:56Z thomasb $ + +*/ + +$messages = array(); +$messages['loginfailed'] = 'Saio sarrerak huts egin du'; +$messages['cookiesdisabled'] = 'Zure nabigatzaileak ez ditu cookie-ak onartzen'; +$messages['sessionerror'] = 'Zure saioa baliogabea da edo iraungita dago'; +$messages['imaperror'] = 'Huts IMAP zerbitzarira konektatzerakoan'; +$messages['nomessagesfound'] = 'Ez da mezurik aurkitu posta kutxa honetan'; +$messages['loggedout'] = 'Saioa behar bezala amaitu duzu. Agur!'; +$messages['mailboxempty'] = 'Posta kutxa hutsik dago'; +$messages['loading'] = 'Kargatzen...'; +$messages['loadingdata'] = 'Datuak kargatzen...'; +$messages['checkingmail'] = 'Mezu berrien bila arakatzen...'; +$messages['sendingmessage'] = 'Mezua bidaltzen...'; +$messages['messagesent'] = 'Mezua behar bezala bidali da'; +$messages['savingmessage'] = 'Mezua gordetzen...'; +$messages['messagesaved'] = 'Mezua zirriborroetan gordea'; +$messages['successfullysaved'] = 'Behar bezala gorde da'; +$messages['addedsuccessfully'] = 'Txartela behar bezala gehitu da helbide liburura'; +$messages['contactexists'] = 'ePosta honetako txartel bat badago dagoeneko'; +$messages['blockedimages'] = 'Zure pribazitatea mantentzeko urruneko irudiak blokeatu egin dira.'; +$messages['encryptedmessage'] = 'Hau enkriptaturiko mezu bat da eta ezin da bistarazi. Barkatu!'; +$messages['nocontactsfound'] = 'Ez da txartelik aurkitu'; +$messages['sendingfailed'] = 'Huts mezua bidaltzerakoan'; +$messages['errorsaving'] = 'Errore bat gertatu da gordetzerakoan'; +$messages['errormoving'] = 'Ezin da mezua mugitu'; +$messages['errordeleting'] = 'Ezin da mezua ezabatu'; +$messages['deletecontactconfirm'] = 'Benetan hautaturiko kontaktuak ezabatu nahi dituzula?'; +$messages['deletemessagesconfirm'] = 'Benetan hautaturiko mezuak ezabatu nahi dituzula?'; +$messages['deletefolderconfirm'] = 'Benetan Karpeta hau ezabatu nahi duzu?'; +$messages['purgefolderconfirm'] = 'Benetan karpeta honetako mezu guziak ezabatu nahi dituzu?'; +$messages['formincomplete'] = 'Inprimakia ez guztiz bete'; +$messages['noemailwarning'] = 'Mesedez idatzi baliozko eposta helbide bat'; +$messages['nonamewarning'] = 'Mesedez izen bat idatzi'; +$messages['nopagesizewarning'] = 'Mesedez paper tamaina idatzi'; +$messages['norecipientwarning'] = 'Mesedez behintzat hartzaile bat idatzi'; +$messages['nosubjectwarning'] = '"Gaia" eremua hutsik dago. Bat idatzi nahi al duzu?'; +$messages['nobodywarning'] = 'Testu gabeko mezu hau bidali?'; +$messages['notsentwarning'] = 'Mezua ez da bidali. Mezua ezeztatu nahi al duzu?'; +$messages['noldapserver'] = 'Mesedez hautatu bilaketa egiteko LDAP zerbitzari bat'; +$messages['nocontactsreturned'] = 'Ez da kontakturik aurkitu'; +$messages['nosearchname'] = 'Mesedez idatzi kontaktu izen bat edo eposta helbide bat'; +$messages['searchsuccessful'] = '$nr mezu aurkiturik'; +$messages['searchnomatch'] = 'Bilaketak ez du emaitzarik itzuli'; +$messages['searching'] = 'Bilatzen...'; +$messages['checking'] = 'Arakatzen...'; +$messages['nospellerrors'] = 'Ez da ortografia errorerik aurkitu'; +$messages['folderdeleted'] = 'Karpeta behar bezala ezabatu da'; +$messages['deletedsuccessfully'] = 'Behar bezala ezabatu da'; +$messages['converting'] = 'Mezuaren formatua ezabatzen'; +$messages['messageopenerror'] = 'Ezin da zerbitzaritik mezua kargatu'; +$messages['fileuploaderror'] = 'Huts fitxategia eransterakoan'; +$messages['filesizeerror'] = 'Erantsi nahi duzun fitxategian $size tamaina muga gainditzen du'; + +?> diff --git a/program/localization/fi/labels.inc b/program/localization/fi/labels.inc new file mode 100644 index 0000000..0e45437 --- /dev/null +++ b/program/localization/fi/labels.inc @@ -0,0 +1,181 @@ + | + | Veljo Velling | + +-----------------------------------------------------------------------+ + + @version $Id: labels.inc 619 2007-06-13 07:09:09Z thomasb $ + +*/ + +$labels = array(); +$labels['welcome'] = 'Tervetuloa $product -käyttäjäksi'; +$labels['username'] = 'Käyttäjätunnus'; +$labels['password'] = 'Salasana'; +$labels['server'] = 'Palvelin'; +$labels['login'] = 'Kirjaudu'; +$labels['logout'] = 'Kirjaudu ulos'; +$labels['mail'] = 'Sähköposti'; +$labels['settings'] = 'Omat asetukset'; +$labels['addressbook'] = 'Osoitekirja'; +$labels['inbox'] = 'Saapuneet'; +$labels['drafts'] = 'Luonnokset'; +$labels['sent'] = 'Lähetetyt'; +$labels['trash'] = 'Roskakori'; +$labels['junk'] = 'Roskaposti'; +$labels['subject'] = 'Aihe'; +$labels['from'] = 'Lähettäjä'; +$labels['to'] = 'Vastaanottaja'; +$labels['cc'] = 'Kopio'; +$labels['bcc'] = 'Piilokopio'; +$labels['replyto'] = 'Vastaus osoitteeseen'; +$labels['date'] = 'Päiväys'; +$labels['size'] = 'Koko'; +$labels['priority'] = 'Tärkeys'; +$labels['organization'] = 'Organisaatio'; +$labels['reply-to'] = 'Vastaus osoitteeseen'; +$labels['mailboxlist'] = 'Kansiot'; +$labels['messagesfromto'] = 'Viestit $from-$to/$count'; +$labels['messagenrof'] = 'Viesti $nr/$count'; +$labels['moveto'] = 'siirrä...'; +$labels['download'] = 'lataa'; +$labels['filename'] = 'Tiedoston nimi'; +$labels['filesize'] = 'Tiedoston koko'; +$labels['preferhtml'] = 'Käytä HTML:aa'; +$labels['htmlmessage'] = 'HTML-viesti'; +$labels['prettydate'] = 'Nätit päiväykset'; +$labels['addtoaddressbook'] = 'Lisää osoitekirjaan'; +$labels['sun'] = 'Su'; +$labels['mon'] = 'Ma'; +$labels['tue'] = 'Ti'; +$labels['wed'] = 'Ke'; +$labels['thu'] = 'To'; +$labels['fri'] = 'Pe'; +$labels['sat'] = 'La'; +$labels['sunday'] = 'Sunnuntai'; +$labels['monday'] = 'Maanantai'; +$labels['tuesday'] = 'Tiistai'; +$labels['wednesday'] = 'Keskiviikko'; +$labels['thursday'] = 'Torstai'; +$labels['friday'] = 'Perjantai'; +$labels['saturday'] = 'Lauantai'; +$labels['today'] = 'Tänään'; +$labels['checkmail'] = 'Tarkista saapuneet viestit'; +$labels['writenewmessage'] = 'Kirjoita uusi viesti'; +$labels['replytomessage'] = 'Vastaa viestiin'; +$labels['replytoallmessage'] = 'Vastaa kaikille'; +$labels['forwardmessage'] = 'Välitä viesti'; +$labels['deletemessage'] = 'Siirrä viesti roskakoriin'; +$labels['printmessage'] = 'Tulosta viesti'; +$labels['previousmessage'] = 'Näytä edellinen viesti'; +$labels['previousmessages'] = 'Näytä edelliset viestit'; +$labels['firstmessage'] = 'Näytä ensimmäinen viesti'; +$labels['firstmessages'] = 'Näytä ensimmäinen viestiluettelo'; +$labels['nextmessage'] = 'Näytä edellinen viesti'; +$labels['nextmessages'] = 'Näytä seuraavat viestit'; +$labels['lastmessage'] = 'Näytä viimeinen viesti'; +$labels['lastmessages'] = 'Näytä viimeinen viestiluettelo'; +$labels['backtolist'] = 'Takaisin viesteihin'; +$labels['viewsource'] = 'Näytä lähdekoodi'; +$labels['select'] = 'Valitse'; +$labels['all'] = 'Kaikki'; +$labels['none'] = 'Ei mitään'; +$labels['unread'] = 'Lukemattomat'; +$labels['compact'] = 'Tiivistä'; +$labels['empty'] = 'Empty'; +$labels['purge'] = 'Puhdista'; +$labels['quota'] = 'Levytila'; +$labels['unknown'] = 'tuntematon'; +$labels['unlimited'] = 'rajoittamaton'; +$labels['quicksearch'] = 'Pikahaku'; +$labels['resetsearch'] = 'Nollaa haku'; +$labels['compose'] = 'Viestin kirjoitus'; +$labels['sendmessage'] = 'Lähetä viesti'; +$labels['savemessage'] = 'Tallenna tämä luonnos'; +$labels['addattachment'] = 'Liitetiedosto'; +$labels['charset'] = 'Merkistö'; +$labels['editortype'] = 'Editorin tyyppi'; +$labels['returnreceipt'] = 'Perillesaapumisilmoitus'; +$labels['checkspelling'] = 'Tarkista oikeinkirjoitus'; +$labels['resumeediting'] = 'Jatka muokkausta'; +$labels['revertto'] = 'Muuta takaisin'; +$labels['attachments'] = 'Liitetiedostot'; +$labels['upload'] = 'Lisää'; +$labels['close'] = 'Sulje'; +$labels['low'] = 'Matala'; +$labels['lowest'] = 'Matalin'; +$labels['normal'] = 'Normaali'; +$labels['high'] = 'Korkea'; +$labels['highest'] = 'Korkein'; +$labels['nosubject'] = '(ei otsikkoa)'; +$labels['showimages'] = 'Näytä kuvat'; +$labels['htmltoggle'] = 'HTML'; +$labels['plaintoggle'] = 'Tavallinen teksti'; +$labels['name'] = 'Näkyvä nimi'; +$labels['firstname'] = 'Etunimi'; +$labels['surname'] = 'Sukunimi'; +$labels['email'] = 'E-Mail'; +$labels['addcontact'] = 'Lisää valittu kontakti osoitekirjaan'; +$labels['editcontact'] = 'Muokkaa kontaktia'; +$labels['edit'] = 'Muokkaa'; +$labels['cancel'] = 'Peruuta'; +$labels['save'] = 'Tallenna'; +$labels['delete'] = 'Poista'; +$labels['newcontact'] = 'Luo uusi kontakti'; +$labels['deletecontact'] = 'Poista valitut kontaktit'; +$labels['composeto'] = 'Kirjoita viesti kontaktille'; +$labels['contactsfromto'] = 'Kontaktit $from-$to/$count'; +$labels['print'] = 'Tulosta'; +$labels['export'] = 'Vie (export)'; +$labels['previouspage'] = 'Näytä edellinen luettelo'; +$labels['firstpage'] = 'Näytä ensimmäinen luettelo'; +$labels['nextpage'] = 'Näytä seuraava luettelo'; +$labels['lastpage'] = 'Näytä viimeinen luettelo'; +$labels['groups'] = 'Ryhmät'; +$labels['personaladrbook'] = 'Hensilökohtaiset osoitteet'; +$labels['settingsfor'] = 'Asetukset'; +$labels['preferences'] = 'Asetukset'; +$labels['userpreferences'] = 'Käyttäjän asetukset'; +$labels['editpreferences'] = 'Muokkaa käyttäjän asetuksia'; +$labels['identities'] = 'Identiteetit'; +$labels['manageidentities'] = 'Muokkaa tunnuksen identiteettejä'; +$labels['newidentity'] = 'Uusi identiteetti'; +$labels['newitem'] = 'Uusi'; +$labels['edititem'] = 'Muokkaa'; +$labels['setdefault'] = 'Aseta vakioksi'; +$labels['language'] = 'Kieli'; +$labels['timezone'] = 'Aikavyöhyke'; +$labels['pagesize'] = 'Rivejä sivulla'; +$labels['signature'] = 'Allekirjoitus'; +$labels['dstactive'] = 'Kesäaika'; +$labels['htmleditor'] = 'Kirjoita HTML-muodossa'; +$labels['htmlsignature'] = 'HTML-allekirjoitus'; +$labels['previewpane'] = 'Näytä esikatselulehti'; +$labels['autosavedraft'] = 'Tallenna luonnos automaattisesti'; +$labels['everynminutes'] = '$n minuutin välein'; +$labels['never'] = 'ei koskaan'; +$labels['folder'] = 'Kansio'; +$labels['folders'] = 'Kansiot'; +$labels['foldername'] = 'Kansion nimi'; +$labels['subscribed'] = 'Näytetään'; +$labels['create'] = 'Luo uusi'; +$labels['createfolder'] = 'Luo uusi kansio'; +$labels['rename'] = 'Nimeä uudelleen'; +$labels['renamefolder'] = 'Nimeä kansio uudelleen'; +$labels['deletefolder'] = 'Poista kansio'; +$labels['managefolders'] = 'Kansioiden ylläpito'; +$labels['sortby'] = 'Järjestä'; +$labels['sortasc'] = 'Järjestä nousevasti'; +$labels['sortdesc'] = 'Järjestä laskevasti'; + +?> \ No newline at end of file diff --git a/program/localization/fi/messages.inc b/program/localization/fi/messages.inc new file mode 100644 index 0000000..7d2bbb2 --- /dev/null +++ b/program/localization/fi/messages.inc @@ -0,0 +1,78 @@ + | + | Veljo Velling | + +-----------------------------------------------------------------------+ + + @version $Id: messages.inc 619 2007-06-13 07:09:09Z thomasb $ + +*/ + +$messages = array(); +$messages['loginfailed'] = 'Sisäänkirjautuminen epäonnistui'; +$messages['cookiesdisabled'] = 'Selaimesi ei hyväksy evästeitä'; +$messages['sessionerror'] = 'Sessio ei kelpaa tai ei ole enää voimassa'; +$messages['imaperror'] = 'Yhteys IMAP-palvelimeen epäonnistui'; +$messages['nomessagesfound'] = 'Kansiossa ei ole sähköpostiviestejä'; +$messages['loggedout'] = 'Sinut on kirjattu ulos järjestelmästä.'; +$messages['mailboxempty'] = 'Kansio on tyhjä'; +$messages['loading'] = 'Ladataan...'; +$messages['loadingdata'] = 'Ladataan tietoja...'; +$messages['checkingmail'] = 'Tarkistetaan saapuneita viestejä...'; +$messages['sendingmessage'] = 'Lähetetään viestiä...'; +$messages['messagesent'] = 'Viesti lähetetty'; +$messages['savingmessage'] = 'Tallennetaan viestiä...'; +$messages['messagesaved'] = 'Viesti tallennettu "Luonnokset" -kansioon'; +$messages['successfullysaved'] = 'Tallennus onnistui'; +$messages['addedsuccessfully'] = 'Kontakti lisätty osoitekirjaan'; +$messages['contactexists'] = 'Samalla sähköpostiosoitteella on jo olemassa kontakti'; +$messages['blockedimages'] = 'Turvallisuussyistä viestin kuvia ei näytetty.'; +$messages['encryptedmessage'] = 'Viesti on salattu, eikä sitä voida näyttää.'; +$messages['nocontactsfound'] = 'Ei kontakteja'; +$messages['contactnotfound'] = 'Pyydettyä yhteystietoa ei löytynyt'; +$messages['sendingfailed'] = 'Viestin lähetys epäonnistui'; +$messages['errorsaving'] = 'Tallennuksessa tapahtui virhe'; +$messages['errormoving'] = 'Viestiä ei voitu siirtää'; +$messages['errordeleting'] = 'Viestiä ei voitu poistaa'; +$messages['deletecontactconfirm'] = 'Haluatko varmasti poistaa valitut kontaktit?'; +$messages['deletemessagesconfirm'] = 'Haluatko varmasti poistaa valitut viestit?'; +$messages['deletefolderconfirm'] = 'Haluatko varmasti poistaa kansion?'; +$messages['purgefolderconfirm'] = 'Haluatko varmasti poistaa kaikki viestit kansiosta?'; +$messages['formincomplete'] = 'Lomakkeen tiedot olivat puutteelliset'; +$messages['noemailwarning'] = 'Anna sähköpostiosoite'; +$messages['nonamewarning'] = 'Anna nimi'; +$messages['nopagesizewarning'] = 'Anna sivukoko'; +$messages['norecipientwarning'] = 'Anna ainakin yksi vastaanottaja'; +$messages['nosubjectwarning'] = '"Otsikko" -kenttä on tyhjä. Haluaisitko kirjoittaa viestillesi otsikon?'; +$messages['nobodywarning'] = 'Lähetetäänkö viesti ilman tekstiä?'; +$messages['notsentwarning'] = 'Viestiä ei lähetetty. Haluatko poistaa viestin?'; +$messages['noldapserver'] = 'Valitse LDAP -palvelin'; +$messages['nocontactsreturned'] = 'Yhtään kontaktia ei löytynyt'; +$messages['nosearchname'] = 'Anna kontaktin nimi tai sähköpostiosoite'; +$messages['searchsuccessful'] = 'Löydetty $nr viestiä'; +$messages['searchnomatch'] = 'Haku ei tuottanut tuloksia'; +$messages['searching'] = 'Etsitään...'; +$messages['checking'] = 'Tarkistetaan...'; +$messages['nospellerrors'] = 'Kirjoitusvirheitä ei löytynyt'; +$messages['folderdeleted'] = 'Kansio poistettu onnistuneesti'; +$messages['deletedsuccessfully'] = 'Poistettu onnistuneesti'; +$messages['converting'] = 'Poistetaan asettelu viestistä...'; +$messages['messageopenerror'] = 'Virhe kopioitaessa viestiä palvelimelta'; +$messages['fileuploaderror'] = 'Tiedoston lähettäminen epäonnistui'; +$messages['filesizeerror'] = 'Lähetettävä tiedosto ylittää sallitun enimmäiskoon $size'; +$messages['copysuccess'] = 'Kopioitu $nr osoitetta onnistuneesti'; +$messages['copyerror'] = 'Yhtään osoitetta ei voitu kopioida'; +$messages['sourceisreadonly'] = 'Tämän osoitteen lähde on kirjoitussuojattu'; +$messages['errorsavingcontact'] = 'Yhteystietoa ei voitu tallentaa'; + +?> \ No newline at end of file diff --git a/program/localization/hu/labels.inc b/program/localization/hu/labels.inc new file mode 100644 index 0000000..b57b18b --- /dev/null +++ b/program/localization/hu/labels.inc @@ -0,0 +1,78 @@ + | + | Ervin Hegedüs | + +-----------------------------------------------------------------------+ + + @version $Id: labels.inc 619 2007-06-13 07:09:09Z thomasb $ + +*/ + +$messages = array(); +$messages['loginfailed'] = 'Sikertelen belépés'; +$messages['cookiesdisabled'] = 'A böngésző nem támogatja a sütik használatát'; +$messages['sessionerror'] = 'Érvénytelen vagy lejárt munkamenet'; +$messages['imaperror'] = 'Nem sikerült a kapcsolódás az IMAP szerverhez'; +$messages['nomessagesfound'] = 'A fiók nem tartalmaz leveleket'; +$messages['loggedout'] = 'Sikeres kijelentkezés. Viszont látásra!'; +$messages['mailboxempty'] = 'A fiók üres'; +$messages['loading'] = 'Betöltés...'; +$messages['loadingdata'] = 'Az adatok betöltése...'; +$messages['checkingmail'] = 'Új üzenetek keresése...'; +$messages['sendingmessage'] = 'Az üzenet küldése...'; +$messages['messagesent'] = 'Az üzenet elküldve'; +$messages['savingmessage'] = 'Az üzenet mentése...'; +$messages['messagesaved'] = 'Az üzenet elmentve a Sablonokhoz'; +$messages['successfullysaved'] = 'A mentés sikerült'; +$messages['addedsuccessfully'] = 'A cím hozzáadása a címjegyzékhez megtörtént'; +$messages['contactexists'] = 'A kapcsolat már létezik ezzel az e-mail címmel'; +$messages['blockedimages'] = 'Biztonsági okokból a távoli képek letöltése tiltott.'; +$messages['encryptedmessage'] = 'Az üzenet titkosított, emiatt nem tudom megjeleníteni.'; +$messages['nocontactsfound'] = 'Nincs kapcsolat'; +$messages['contactnotfound'] = 'A kiválasztott kapcsolat nem található'; +$messages['sendingfailed'] = 'Az üzenet elküldése nem sikerült'; +$messages['errorsaving'] = 'A mentés során hiba lépett fel'; +$messages['errormoving'] = 'Az üzenetet nem sikerült áthelyezni'; +$messages['errordeleting'] = 'Az üzenetet nem sikerült törölni'; +$messages['deletecontactconfirm'] = 'Biztos, hogy törölni szeretnéd a kijelölt címe(ke)t?'; +$messages['deletemessagesconfirm'] = 'Biztos, hogy törölni szeretnéd a kijelölt üzenete(ke)t?'; +$messages['deletefolderconfirm'] = 'Biztos, hogy törölni szeretnéd ezt a mappát?'; +$messages['purgefolderconfirm'] = 'Biztos vagy benne, hogy az összes üzenet törölhető?'; +$messages['formincomplete'] = 'Az űrlap hiányosan lett kitöltve'; +$messages['noemailwarning'] = 'Adj meg egy valós e-mail címet'; +$messages['nonamewarning'] = 'Adj meg egy nevet'; +$messages['nopagesizewarning'] = 'Add meg a papír méretét'; +$messages['norecipientwarning'] = 'Legalább egy címzettet adj meg'; +$messages['nosubjectwarning'] = 'A "Tárgy" mező üres. Szeretnéd most kitölteni?'; +$messages['nobodywarning'] = 'Elküldöd az üzenetet tárgy nélkül?'; +$messages['notsentwarning'] = 'Az üzenet még nem küldtem el. Eldobod az üzenetet?'; +$messages['noldapserver'] = 'Adj meg egy LDAP szervert a kereséshez'; +$messages['nocontactsreturned'] = 'Nem találtam kapcsolatot'; +$messages['nosearchname'] = 'Add meg a kapcsolat nevét vagy e-mail címét'; +$messages['searchsuccessful'] = '$nr üzenetet találtam'; +$messages['searchnomatch'] = 'Nincs találat'; +$messages['searching'] = 'Keresés...'; +$messages['checking'] = 'Ellenőrzés...'; +$messages['nospellerrors'] = 'Nem találtam helyesírási hibát'; +$messages['folderdeleted'] = 'A mappa sikeresen törölve'; +$messages['deletedsuccessfully'] = 'Törölve'; +$messages['converting'] = 'Formázás eltávolítása az üzenetből...'; +$messages['messageopenerror'] = 'Nem tudom letölteni a leveleket a szerverről'; +$messages['fileuploaderror'] = 'Feltöltés sikertelen'; +$messages['filesizeerror'] = 'A feltöltött file mérete meghaladja a maximális méretet $size'; +$messages['copysuccess'] = 'Sikeresen másoltunk $nr címet'; +$messages['copyerror'] = 'Nem tudtunk másolni egyetlen címet sem'; +$messages['sourceisreadonly'] = 'Ez a címforrás csak olvasható'; +$messages['errorsavingcontact'] = 'Nem tudtuk menteni a kapcsolat címét'; + +?> diff --git a/program/localization/hu/messages.inc b/program/localization/hu/messages.inc new file mode 100644 index 0000000..1b36afb --- /dev/null +++ b/program/localization/hu/messages.inc @@ -0,0 +1,181 @@ + | + | Ervin Hegedüs | + +-----------------------------------------------------------------------+ + + @version $Id: messages.inc 619 2007-06-13 07:09:09Z thomasb $ + +*/ + +$labels = array(); +$labels['welcome'] = 'Üdvözli a $product'; +$labels['username'] = 'Felhasználónév'; +$labels['password'] = 'Jelszó'; +$labels['server'] = 'Szerver'; +$labels['login'] = 'Belépés'; +$labels['logout'] = 'Kijelentkezés'; +$labels['mail'] = 'E-mail'; +$labels['settings'] = 'Egyéni beállítások'; +$labels['addressbook'] = 'Címjegyzék'; +$labels['inbox'] = 'Érkezett levelek'; +$labels['drafts'] = 'Piszkozatok'; +$labels['sent'] = 'Küldött levelek'; +$labels['trash'] = 'Törölt elemek'; +$labels['junk'] = 'Szemetes'; +$labels['subject'] = 'Tárgy'; +$labels['from'] = 'Feladó'; +$labels['to'] = 'Címzett'; +$labels['cc'] = 'Másolat'; +$labels['bcc'] = 'Titkos másolat'; +$labels['replyto'] = 'Válaszcím'; +$labels['date'] = 'Dátum'; +$labels['size'] = 'Méret'; +$labels['priority'] = 'Sürgősség'; +$labels['organization'] = 'Szervezet'; +$labels['reply-to'] = 'Válaszcím'; +$labels['mailboxlist'] = 'Mappák'; +$labels['messagesfromto'] = 'Üzenetek: $from - $to / $count'; +$labels['messagenrof'] = '$nr / $count üzenet'; +$labels['moveto'] = 'áthelyezés...'; +$labels['download'] = 'letöltés'; +$labels['filename'] = 'File neve'; +$labels['filesize'] = 'File mérete'; +$labels['preferhtml'] = 'HTML megjelenítés'; +$labels['htmlmessage'] = 'HTML üzenet'; +$labels['prettydate'] = 'Rövid dátumok'; +$labels['addtoaddressbook'] = 'Hozzáadás a címjegyzékhez'; +$labels['sun'] = 'Vas'; +$labels['mon'] = 'Hét'; +$labels['tue'] = 'Kedd'; +$labels['wed'] = 'Szer'; +$labels['thu'] = 'Csüt'; +$labels['fri'] = 'Pén'; +$labels['sat'] = 'Szom'; +$labels['sunday'] = 'Vasárnap'; +$labels['monday'] = 'Hétfő'; +$labels['tuesday'] = 'Kedd'; +$labels['wednesday'] = 'Szerda'; +$labels['thursday'] = 'Csütörtök'; +$labels['friday'] = 'Péntek'; +$labels['saturday'] = 'Szombat'; +$labels['today'] = 'Ma'; +$labels['checkmail'] = 'Új üzenetek ellenőrzése'; +$labels['writenewmessage'] = 'Új üzenet'; +$labels['replytomessage'] = 'Válasz'; +$labels['replytoallmessage'] = 'Válasz a feladónak és az összes címzettnek'; +$labels['forwardmessage'] = 'Továbbítás'; +$labels['deletemessage'] = 'Törlés'; +$labels['printmessage'] = 'Nyomtatás'; +$labels['previousmessage'] = 'Előző levél mutatása'; +$labels['previousmessages'] = 'Előző rész mutatása'; +$labels['firstmessage'] = 'Első levél mutatása'; +$labels['firstmessages'] = 'Első rész mutatása'; +$labels['nextmessage'] = 'Következő levél mutatása'; +$labels['nextmessages'] = 'Következő rész mutatása'; +$labels['lastmessage'] = 'Utolsó levél mutatása'; +$labels['lastmessages'] = 'Utolsó rész mutatása'; +$labels['backtolist'] = 'Vissza az üzenetekhez'; +$labels['viewsource'] = 'Forrás megtekintése'; +$labels['select'] = 'Kijelölés'; +$labels['all'] = 'Összes'; +$labels['none'] = 'Nincs'; +$labels['unread'] = 'Olvasatlan'; +$labels['compact'] = 'Tömörítés'; +$labels['empty'] = 'Ürítés'; +$labels['purge'] = 'Tisztítás'; +$labels['quota'] = 'Diszk használat'; +$labels['unknown'] = 'ismeretlen'; +$labels['unlimited'] = 'korlátlan'; +$labels['quicksearch'] = 'Gyorskeresés'; +$labels['resetsearch'] = 'Alapállapot'; +$labels['compose'] = 'Üzenet létrehozása'; +$labels['sendmessage'] = 'Üzenet azonnali küldése'; +$labels['savemessage'] = 'Vázlat mentése'; +$labels['addattachment'] = 'File csatolása'; +$labels['charset'] = 'Karakterkészlet'; +$labels['editortype'] = 'Szerkesztő típusa'; +$labels['returnreceipt'] = 'Értesítés'; +$labels['checkspelling'] = 'Helyesírás-ellenőrzés'; +$labels['resumeediting'] = 'Helyesírás kész'; +$labels['revertto'] = 'Vissza erre:'; +$labels['attachments'] = 'Csatolások'; +$labels['upload'] = 'Feltöltés'; +$labels['close'] = 'Bezárás'; +$labels['low'] = 'Alacsony'; +$labels['lowest'] = 'Legkisebb'; +$labels['normal'] = 'Normál'; +$labels['high'] = 'Magas'; +$labels['highest'] = 'Legmagasabb'; +$labels['nosubject'] = '(nincs tárgy)'; +$labels['showimages'] = 'Képek megjelenítése'; +$labels['htmltoggle'] = 'HTML'; +$labels['plaintoggle'] = 'Egyszerű szöveg'; +$labels['name'] = 'Megjelenített név'; +$labels['firstname'] = 'Keresztnév'; +$labels['surname'] = 'Vezetéknév'; +$labels['email'] = 'E-mail cím'; +$labels['addcontact'] = 'Új kapcsolat hozzáadása'; +$labels['editcontact'] = 'Kapcsolat szerkesztése'; +$labels['edit'] = 'Szerkesztés'; +$labels['cancel'] = 'Mégsem'; +$labels['save'] = 'Mentés'; +$labels['delete'] = 'Törlés'; +$labels['newcontact'] = 'Új névjegykártya létrehozása'; +$labels['deletecontact'] = 'Kijelölt kapcsolatok törlése'; +$labels['composeto'] = 'E-mail küldése erre a címre'; +$labels['contactsfromto'] = 'Kapcsolatok: $from - $to / $count'; +$labels['print'] = 'Nyomtatás'; +$labels['export'] = 'Exportálás'; +$labels['previouspage'] = 'Előző lap'; +$labels['firstpage'] = 'Első lap'; +$labels['nextpage'] = 'Következő lap'; +$labels['lastpage'] = 'Utolsó lap'; +$labels['groups'] = 'Csoportok'; +$labels['personaladrbook'] = 'Személyes címjegyzék'; +$labels['settingsfor'] = 'Beállítás'; +$labels['preferences'] = 'Beállítások'; +$labels['userpreferences'] = 'Felhasználói beállítások'; +$labels['editpreferences'] = 'Felhasználói beállítások szerkesztése'; +$labels['identities'] = 'Azonosítók'; +$labels['manageidentities'] = 'Hozzáférés azonosítóinak kezelése'; +$labels['newidentity'] = 'Új azonosító'; +$labels['newitem'] = 'Új elem'; +$labels['edititem'] = 'Elem szerkesztése'; +$labels['setdefault'] = 'Beállítás alapértelmezettnek'; +$labels['language'] = 'Nyelv'; +$labels['timezone'] = 'Időzóna'; +$labels['pagesize'] = 'Sorok száma egy oldalon'; +$labels['signature'] = 'Aláírás'; +$labels['dstactive'] = 'Nyári időszámítás'; +$labels['htmleditor'] = 'HTML üzenet írása'; +$labels['htmlsignature'] = 'HTML aláírás'; +$labels['previewpane'] = 'Előnézeti kép'; +$labels['autosavedraft'] = 'Automatikus piszkozat mentés'; +$labels['everynminutes'] = 'minden $n percben'; +$labels['never'] = 'soha'; +$labels['folder'] = 'Mappa'; +$labels['folders'] = 'Mappák'; +$labels['foldername'] = 'Mappa neve'; +$labels['subscribed'] = 'Feliratkozás'; +$labels['create'] = 'Létrehozás'; +$labels['createfolder'] = 'Új mappa létrehozása'; +$labels['rename'] = 'Átnevezés'; +$labels['renamefolder'] = 'Mappa átnevezése'; +$labels['deletefolder'] = 'Mappa törlése'; +$labels['managefolders'] = 'Mappák kezelése'; +$labels['sortby'] = 'Rendezés'; +$labels['sortasc'] = 'növekvő'; +$labels['sortdesc'] = 'csökkenő'; + +?> diff --git a/program/localization/ja/labels.inc b/program/localization/ja/labels.inc new file mode 100644 index 0000000..a13a1c6 --- /dev/null +++ b/program/localization/ja/labels.inc @@ -0,0 +1,181 @@ + | + | Takashi Takamatsu | + +-----------------------------------------------------------------------+ + + @version $Id: labels.inc 619 2007-06-13 07:09:09Z thomasb $ + +*/ + +$labels = array(); +$labels['welcome'] = 'ようこそ $product へ'; +$labels['username'] = 'ユーザー名'; +$labels['password'] = 'パスワード'; +$labels['server'] = 'サーバ'; +$labels['login'] = 'ログイン'; +$labels['logout'] = 'ログアウト'; +$labels['mail'] = '電子メール'; +$labels['settings'] = '個人設定'; +$labels['addressbook'] = 'アドレス帳'; +$labels['inbox'] = '受信箱'; +$labels['drafts'] = '草稿'; +$labels['sent'] = '送信箱'; +$labels['trash'] = 'ごみ箱'; +$labels['junk'] = 'ジャンク'; +$labels['subject'] = '件名'; +$labels['from'] = '送信者'; +$labels['to'] = '受信者'; +$labels['cc'] = 'コピー'; +$labels['bcc'] = 'Bcc'; +$labels['replyto'] = '返信先'; +$labels['date'] = '日付'; +$labels['size'] = '容量'; +$labels['priority'] = '優先度'; +$labels['organization'] = '所属'; +$labels['reply-to'] = '返信先'; +$labels['mailboxlist'] = 'フォルダ一覧'; +$labels['messagesfromto'] = '表示中のメッセージ: $from ~ $to (全: $count 件)'; +$labels['messagenrof'] = '現在のメッセージ:$nr (全: $count 件)'; +$labels['moveto'] = 'フォルダの移動'; +$labels['download'] = 'ダウンロード'; +$labels['filename'] = 'ファイル名'; +$labels['filesize'] = 'ファイルサイズ'; +$labels['preferhtml'] = 'HTML を表示'; +$labels['htmlmessage'] = 'HTML メッセージ'; +$labels['prettydate'] = '簡易な日付表示'; +$labels['addtoaddressbook'] = 'アドレス帳に追加'; +$labels['sun'] = '日'; +$labels['mon'] = '月'; +$labels['tue'] = '火'; +$labels['wed'] = '水'; +$labels['thu'] = '木'; +$labels['fri'] = '金'; +$labels['sat'] = '土'; +$labels['sunday'] = '日曜日'; +$labels['monday'] = '月曜日'; +$labels['tuesday'] = '火曜日'; +$labels['wednesday'] = '水曜日'; +$labels['thursday'] = '木曜日'; +$labels['friday'] = '金曜日'; +$labels['saturday'] = '土曜日'; +$labels['today'] = '今日'; +$labels['checkmail'] = '新着の確認'; +$labels['writenewmessage'] = '新規メールの作成'; +$labels['replytomessage'] = '返信'; +$labels['replytoallmessage'] = '送信者とすべての受信者に返信'; +$labels['forwardmessage'] = '転送'; +$labels['deletemessage'] = 'ごみ箱に移動'; +$labels['printmessage'] = '印刷'; +$labels['previousmessage'] = '前のメッセージへ'; +$labels['previousmessages'] = '前の一覧へ'; +$labels['firstmessage'] = '最初のメッセージへ'; +$labels['firstmessages'] = '最初の一覧へ'; +$labels['nextmessage'] = '次のメッセージへ'; +$labels['nextmessages'] = '次の一覧へ'; +$labels['lastmessage'] = '最後のメッセージへ'; +$labels['lastmessages'] = '最後の一覧へ'; +$labels['backtolist'] = '一覧に戻る'; +$labels['viewsource'] = 'ソースの表示'; +$labels['select'] = '選択'; +$labels['all'] = 'すべて'; +$labels['none'] = 'なし'; +$labels['unread'] = '未読'; +$labels['compact'] = 'コンパクト'; +$labels['empty'] = '空'; +$labels['purge'] = '破棄'; +$labels['quota'] = 'ディスク使用量'; +$labels['unknown'] = '不明'; +$labels['unlimited'] = '無制限'; +$labels['quicksearch'] = 'Quick search'; +$labels['resetsearch'] = 'Reset search'; +$labels['compose'] = 'メッセージの作成'; +$labels['sendmessage'] = '今すぐ送信'; +$labels['savemessage'] = '草稿に保存'; +$labels['addattachment'] = 'ファイルの添付'; +$labels['charset'] = '文字エンコード'; +$labels['editortype'] = 'エディターの種類'; +$labels['returnreceipt'] = '開封確認'; +$labels['checkspelling'] = 'スペルチェック'; +$labels['resumeediting'] = '編集の中断'; +$labels['revertto'] = '元に戻す'; +$labels['attachments'] = '添付ファイル'; +$labels['upload'] = 'アップロード'; +$labels['close'] = '閉じる'; +$labels['low'] = '低い'; +$labels['lowest'] = '最低'; +$labels['normal'] = '通常'; +$labels['high'] = '高い'; +$labels['highest'] = '最高'; +$labels['nosubject'] = '(件名なし)'; +$labels['showimages'] = '画像の表示'; +$labels['htmltoggle'] = 'HTML'; +$labels['plaintoggle'] = 'テキスト'; +$labels['name'] = '表示名'; +$labels['firstname'] = '名前'; +$labels['surname'] = '名字'; +$labels['email'] = 'メールアドレス'; +$labels['addcontact'] = '連絡先の新規追加'; +$labels['editcontact'] = '連絡先の編集'; +$labels['edit'] = '編集'; +$labels['cancel'] = 'キャンセル'; +$labels['save'] = '保存'; +$labels['delete'] = '削除'; +$labels['newcontact'] = '連絡先の新規作成'; +$labels['deletecontact'] = '連絡先の削除'; +$labels['composeto'] = 'この連絡先へメールを送信'; +$labels['contactsfromto'] = '連絡先: $from ~ $to (全: $count 件)'; +$labels['print'] = '印刷'; +$labels['export'] = 'エクスポート'; +$labels['previouspage'] = '前の一覧へ'; +$labels['firstpage'] = '最初の一覧へ'; +$labels['nextpage'] = '次の一覧へ'; +$labels['lastpage'] = '最後の一覧へ'; +$labels['groups'] = 'グループ'; +$labels['personaladrbook'] = '個人アドレス'; +$labels['settingsfor'] = '次の設定:'; +$labels['preferences'] = '設定'; +$labels['userpreferences'] = 'ユーザー設定'; +$labels['editpreferences'] = 'ユーザー設定の変更'; +$labels['identities'] = '個人情報'; +$labels['manageidentities'] = 'アカウントの個人情報管理'; +$labels['newidentity'] = '個人情報の新規作成'; +$labels['newitem'] = '新しい項目'; +$labels['edititem'] = '項目の編集'; +$labels['setdefault'] = '標準の設定'; +$labels['language'] = '言語'; +$labels['timezone'] = 'タイムゾーン'; +$labels['pagesize'] = 'ページ単位の表示件数'; +$labels['signature'] = '署名'; +$labels['dstactive'] = '夏時間の適用'; +$labels['htmleditor'] = 'メッセージ作成はHTMLが標準'; +$labels['htmlsignature'] = 'HTML の署名'; +$labels['previewpane'] = 'プレビューペインの表示'; +$labels['autosavedraft'] = '自動的に草稿を保存'; +$labels['everynminutes'] = ' $n 分毎'; +$labels['never'] = 'しない'; +$labels['folder'] = 'フォルダ'; +$labels['folders'] = 'フォルダ一覧'; +$labels['foldername'] = 'フォルダ名'; +$labels['subscribed'] = '購読済'; +$labels['create'] = '作成'; +$labels['createfolder'] = 'フォルダの新規作成'; +$labels['rename'] = '名前の変更'; +$labels['renamefolder'] = 'フォルダ名の変更'; +$labels['deletefolder'] = 'フォルダの削除'; +$labels['managefolders'] = 'フォルダの管理'; +$labels['sortby'] = '整列の基準にする'; +$labels['sortasc'] = '昇順で整列'; +$labels['sortdesc'] = '降順で整列'; + +?> diff --git a/program/localization/ja/messages.inc b/program/localization/ja/messages.inc new file mode 100644 index 0000000..c7ea077 --- /dev/null +++ b/program/localization/ja/messages.inc @@ -0,0 +1,78 @@ + | + | Takashi Takamatsu | + +-----------------------------------------------------------------------+ + + @version $Id: messages.inc 619 2007-06-13 07:09:09Z thomasb $ + +*/ + +$messages = array(); +$messages['loginfailed'] = 'ログインに失敗しました。'; +$messages['cookiesdisabled'] = 'ブラウザーが Cookie を受理しません。'; +$messages['sessionerror'] = 'セッションが正しくないか期限切れです。'; +$messages['imaperror'] = 'IMAP サーバーへの接続に失敗しました。'; +$messages['nomessagesfound'] = 'このメールボックスでメッセージは見つかりません。'; +$messages['loggedout'] = 'セッションの切断に成功しました。さようなら!'; +$messages['mailboxempty'] = 'メールボックスは空です。'; +$messages['loading'] = '読込中...'; +$messages['loadingdata'] = 'データを読込中です...'; +$messages['checkingmail'] = '新しいメッセージの確認中です...'; +$messages['sendingmessage'] = 'メッセージの送信中です...'; +$messages['messagesent'] = 'メッセージの送信に成功しました。'; +$messages['savingmessage'] = 'メッセージを保存しています...'; +$messages['messagesaved'] = 'メッセージを草稿に保存しました。'; +$messages['successfullysaved'] = '保存に成功しました。'; +$messages['addedsuccessfully'] = 'アドレス帳への連絡先の追加に成功しました。'; +$messages['contactexists'] = 'このメールアドレスは既にアドレス帳に存在します。'; +$messages['blockedimages'] = 'プライバシーを保護するため、このメッセージに含まれるリモート画像はブロックされました。'; +$messages['encryptedmessage'] = 'このメッセージは暗号化されているため表示できません。ごめんなさい!'; +$messages['nocontactsfound'] = '連絡先が見つかりません。'; +$messages['contactnotfound'] = '要求された連絡先が見つかりません。'; +$messages['sendingfailed'] = 'メッセージの送信に失敗しました。'; +$messages['errorsaving'] = '保存中にエラーが発生しました。'; +$messages['errormoving'] = 'メッセージを移動できません。'; +$messages['errordeleting'] = 'メッセージを削除できません。'; +$messages['deletecontactconfirm'] = '選択した連絡先を本当に削除しますか?'; +$messages['deletemessagesconfirm'] = '選択したメッセージを本当に削除しますか?'; +$messages['deletefolderconfirm'] = 'このフォルダーを本当に削除しますか?'; +$messages['purgefolderconfirm'] = 'このフォルダの全メッセージを本当に削除しますか?'; +$messages['formincomplete'] = 'フォームの項目が完全に入力されていません。'; +$messages['noemailwarning'] = '有効なメールアドレスを入力して下さい。'; +$messages['nonamewarning'] = '名前を入力して下さい。'; +$messages['nopagesizewarning'] = 'ページのサイズを入力して下さい。'; +$messages['norecipientwarning'] = '受信者を最低 1 人は入力して下さい。'; +$messages['nosubjectwarning'] = '件名が空です。今すぐ入力しますか?'; +$messages['nobodywarning'] = '本文の無いメッセージを送信しますか?'; +$messages['notsentwarning'] = 'メッセージは送信されませんでした。破棄しますか?'; +$messages['noldapserver'] = '検索する LDAP サーバーを選択して下さい。'; +$messages['nocontactsreturned'] = '連絡先が見つかりません。'; +$messages['nosearchname'] = '連絡先の名前かメールアドレスを入力して下さい。'; +$messages['searchsuccessful'] = ' $nr 個のメッセージが見つかりました。'; +$messages['searchnomatch'] = '一致するものがありません。'; +$messages['searching'] = '検索中です...'; +$messages['checking'] = '確認中です...'; +$messages['nospellerrors'] = 'スペルエラーは見つかりませんでした。'; +$messages['folderdeleted'] = 'フォルダーの削除に成功しました。'; +$messages['deletedsuccessfully'] = '削除に成功しました。'; +$messages['converting'] = 'メッセージから書式を削除中です...'; +$messages['messageopenerror'] = 'サーバからメッセージを取得できません。'; +$messages['fileuploaderror'] = 'ファイルのアップロードに失敗しました。'; +$messages['filesizeerror'] = 'アップロードしたファイルのサイズが上限 $size を超えました。'; +$messages['copysuccess'] = 'アドレス $nr 個のコピーに成功しました。'; +$messages['copyerror'] = 'アドレスをコピーできません。'; +$messages['sourceisreadonly'] = 'このアドレス情報は読み取り専用です。'; +$messages['errorsavingcontact'] = '連絡先のアドレスを保存できません。'; + +?> diff --git a/program/localization/pl/labels.inc b/program/localization/pl/labels.inc new file mode 100644 index 0000000..cc5ef3f --- /dev/null +++ b/program/localization/pl/labels.inc @@ -0,0 +1,181 @@ + | + | Sławomir Cichoń | + +-----------------------------------------------------------------------+ + + @version $Id: labels.inc 619 2007-06-13 07:09:09Z thomasb $ + +*/ + +$labels = array(); +$labels['welcome'] = 'Witamy w $product'; +$labels['username'] = 'Login'; +$labels['password'] = 'Hasło'; +$labels['server'] = 'Serwer'; +$labels['login'] = 'Zaloguj'; +$labels['logout'] = 'Wyloguj'; +$labels['mail'] = 'Skrzynka odbiorcza'; +$labels['settings'] = 'Ustawienia'; +$labels['addressbook'] = 'Książka Adresowa'; +$labels['inbox'] = 'Odebrane'; +$labels['drafts'] = 'Kopie robocze'; +$labels['sent'] = 'Wysłane'; +$labels['trash'] = 'Kosz'; +$labels['junk'] = 'Spam'; +$labels['subject'] = 'Temat'; +$labels['from'] = 'Nadawca'; +$labels['to'] = 'Odbiorca'; +$labels['cc'] = 'Kopia'; +$labels['bcc'] = 'Bcc'; +$labels['replyto'] = 'Odpowiedz do'; +$labels['date'] = 'Data'; +$labels['size'] = 'Rozmiar'; +$labels['priority'] = 'Priorytet'; +$labels['organization'] = 'Organizacja'; +$labels['reply-to'] = 'Odpowiedz do'; +$labels['mailboxlist'] = 'Foldery'; +$labels['messagesfromto'] = 'Wiadmość od $from do $to z $count'; +$labels['messagenrof'] = 'Wiadmość $nr z $count'; +$labels['moveto'] = 'Przenieś do...'; +$labels['download'] = 'pobierz'; +$labels['filename'] = 'Nazwa pliku'; +$labels['filesize'] = 'Rozmiar pliku'; +$labels['preferhtml'] = 'Domyślny HTML'; +$labels['htmlmessage'] = 'Widomość HTML'; +$labels['prettydate'] = 'Ładne daty'; +$labels['addtoaddressbook'] = 'Dodaj do książki adresowej '; +$labels['sun'] = 'Nd'; +$labels['mon'] = 'Pn'; +$labels['tue'] = 'Wt'; +$labels['wed'] = 'Śr'; +$labels['thu'] = 'Czw'; +$labels['fri'] = 'Pt'; +$labels['sat'] = 'Sb'; +$labels['sunday'] = 'Niedziela'; +$labels['monday'] = 'Poniedziałek'; +$labels['tuesday'] = 'Wtorek'; +$labels['wednesday'] = 'Środa'; +$labels['thursday'] = 'Czwartek'; +$labels['friday'] = 'Piątek'; +$labels['saturday'] = 'Sobota'; +$labels['today'] = 'Dzisiaj'; +$labels['checkmail'] = 'Sprawdź skrzynkę'; +$labels['writenewmessage'] = 'Utwórz nową wiadmomość'; +$labels['replytomessage'] = 'Odpowiedz nadawcy'; +$labels['replytoallmessage'] = 'Odpowiedz wszystkim'; +$labels['forwardmessage'] = 'Prześlij dalej'; +$labels['deletemessage'] = 'Usuń'; +$labels['printmessage'] = 'Drukuj'; +$labels['previousmessage'] = 'Pokaż poprzednią'; +$labels['previousmessages'] = 'Pokaż poprzednie'; +$labels['firstmessage'] = 'Pokaż pierwszą'; +$labels['firstmessages'] = 'Pokaż pierwsze'; +$labels['nextmessage'] = 'Pokaż następną'; +$labels['nextmessages'] = 'Pokaż następne'; +$labels['lastmessage'] = 'Pokaż ostatnią'; +$labels['lastmessages'] = 'Pokaż ostatnie'; +$labels['backtolist'] = 'Wróc do listy widomości'; +$labels['viewsource'] = 'Pokaż źródło'; +$labels['select'] = 'Wybierz'; +$labels['all'] = 'Zaznacz wszystkie'; +$labels['none'] = 'Odznacz'; +$labels['unread'] = 'Zaznacz nieprzeczytane'; +$labels['compact'] = 'Kompaktuj'; +$labels['empty'] = 'Pusty'; +$labels['purge'] = 'Oczyść'; +$labels['quota'] = 'Użyta Przestrzeń'; +$labels['unknown'] = 'nieznane'; +$labels['unlimited'] = 'bez limitu'; +$labels['quicksearch'] = 'Szybkie szukanie'; +$labels['resetsearch'] = 'Wyczyść filtr'; +$labels['compose'] = 'Utwórz wiadomość'; +$labels['sendmessage'] = 'Wyślij teraz'; +$labels['savemessage'] = 'Zapisz kopie roboczą'; +$labels['addattachment'] = 'Dołącz plik'; +$labels['charset'] = 'Kodowanie znaków'; +$labels['editortype'] = 'Typ edytora'; +$labels['returnreceipt'] = 'Potwierdzenie odbioru'; +$labels['checkspelling'] = 'Sprawdź pisownie'; +$labels['resumeediting'] = 'Przywróć edytowanie'; +$labels['revertto'] = 'Powróć do'; +$labels['attachments'] = 'Załączniki'; +$labels['upload'] = 'Wgraj'; +$labels['close'] = 'Zamknij'; +$labels['low'] = 'Bardzo niski'; +$labels['lowest'] = 'Niski'; +$labels['normal'] = 'Normalny'; +$labels['high'] = 'Wysoki'; +$labels['highest'] = 'Bardzo wysoki'; +$labels['nosubject'] = '(brak tematu)'; +$labels['showimages'] = 'Wyświetl obrazki'; +$labels['htmltoggle'] = 'HTML'; +$labels['plaintoggle'] = 'Zwykły tekst'; +$labels['name'] = 'Nazwa'; +$labels['firstname'] = 'Imię'; +$labels['surname'] = 'Nazwisko'; +$labels['email'] = 'E-Mail'; +$labels['addcontact'] = 'Dodaj znaznaczony kontakt do książki adresowej'; +$labels['editcontact'] = 'Edytuj kontakt'; +$labels['edit'] = 'Edytuj'; +$labels['cancel'] = 'Anuluj'; +$labels['save'] = 'Zapisz'; +$labels['delete'] = 'Kasuj'; +$labels['newcontact'] = 'Dodaj nowy kontakt'; +$labels['deletecontact'] = 'Usuń zaznaczone kontakty'; +$labels['composeto'] = 'Stwórz wiadomość dla'; +$labels['contactsfromto'] = 'Kontakt od $from do $to z $count'; +$labels['print'] = 'Drukuj'; +$labels['export'] = 'Eksportuj'; +$labels['previouspage'] = 'poprzednia strona'; +$labels['firstpage'] = 'pierwsza strona'; +$labels['nextpage'] = 'następna strona'; +$labels['lastpage'] = 'ostatnia strona'; +$labels['groups'] = 'Grupy'; +$labels['personaladrbook'] = 'Książka adresowa'; +$labels['settingsfor'] = 'Ustawienia dla'; +$labels['preferences'] = 'Ustawienia'; +$labels['userpreferences'] = 'Preferencje'; +$labels['editpreferences'] = 'Edytuj preferencję'; +$labels['identities'] = 'Tożsamości'; +$labels['manageidentities'] = 'Zarządzaj tożsamościami'; +$labels['newidentity'] = 'Nowa tożsamość'; +$labels['newitem'] = 'Nowy'; +$labels['edititem'] = 'Edytuj'; +$labels['setdefault'] = 'Ustaw domyślne'; +$labels['language'] = 'Język'; +$labels['timezone'] = 'Strefy czasu'; +$labels['pagesize'] = 'wierszy na stronie'; +$labels['signature'] = 'Podpis'; +$labels['dstactive'] = 'czas letni'; +$labels['htmleditor'] = 'Twórz wiadomości HTML'; +$labels['htmlsignature'] = 'Podpis w HTML'; +$labels['previewpane'] = 'Pokaż podgląd'; +$labels['autosavedraft'] = 'Automatyczny zapis tworzonej wiadomości'; +$labels['everynminutes'] = 'co $n minut'; +$labels['never'] = 'nigdy'; +$labels['folder'] = 'Folder'; +$labels['folders'] = 'Foldery'; +$labels['foldername'] = 'Nazwa folderu'; +$labels['subscribed'] = 'Zapisany'; +$labels['create'] = 'Utwórz'; +$labels['createfolder'] = 'Utwórz nowy folder'; +$labels['rename'] = 'Zmień nazwę'; +$labels['renamefolder'] = 'Zmień nazwę folderu'; +$labels['deletefolder'] = 'Usuń folder'; +$labels['managefolders'] = 'Zarządzaj folderami'; +$labels['sortby'] = 'Sortuj wg.'; +$labels['sortasc'] = 'Rosnąco'; +$labels['sortdesc'] = 'Malejąco'; + +?> \ No newline at end of file diff --git a/program/localization/pl/messages.inc b/program/localization/pl/messages.inc new file mode 100644 index 0000000..23c327b --- /dev/null +++ b/program/localization/pl/messages.inc @@ -0,0 +1,78 @@ + | + | Author: Sławomir Cichoń | + +-----------------------------------------------------------------------+ + + @version $Id: messages.inc 619 2007-06-13 07:09:09Z thomasb $ + +*/ + +$messages = array(); +$messages['loginfailed'] = 'Błąd logowania!'; +$messages['cookiesdisabled'] = 'Twoja przeglądarka nie obsługuje ciasteczek!'; +$messages['sessionerror'] = 'Błąd sesji, bądź sesja wygasła!'; +$messages['imaperror'] = 'Błąd połączenia z serwerem!'; +$messages['nomessagesfound'] = 'Brak wiadomości w skrzynce.'; +$messages['loggedout'] = 'Użytkownik wylogował się poprawnie.'; +$messages['mailboxempty'] = 'Skrzynka jest pusta!'; +$messages['loading'] = 'Ładowanie...'; +$messages['loadingdata'] = 'Ładowanie...'; +$messages['checkingmail'] = 'Sprawdzam czy są nowe wiadomości...'; +$messages['sendingmessage'] = 'Wysyłam wiadomość...'; +$messages['messagesent'] = 'Wiadomość wysłana pomyślnie.'; +$messages['savingmessage'] = 'Zapisywanie wiadomości...'; +$messages['messagesaved'] = 'Wiadomośc została zapisana w kopiach roboczych.'; +$messages['successfullysaved'] = 'Zapisano.'; +$messages['addedsuccessfully'] = 'Kontakt został dodany.'; +$messages['contactexists'] = 'Kontakt o podanym adresie e-mail istnieje!'; +$messages['blockedimages'] = 'Ze względów bezpieczeństwa zewnętrzne obrazki zostały zablokowane.'; +$messages['encryptedmessage'] = 'Przepraszamy, nie można wyświeltlić zaszyfrowanej wiadomości!'; +$messages['nocontactsfound'] = 'Nie znaleziono kontaktu!'; +$messages['contactnotfound'] = 'Szukany kontakt nie został odnaleziony'; +$messages['sendingfailed'] = 'Nie udało się wysłać wiadomości!'; +$messages['errorsaving'] = 'Błąd podczas zapisu!'; +$messages['errormoving'] = 'Nie można przenieść wybranej wiadomości!'; +$messages['errordeleting'] = 'Nie można usunąć wiadomości!'; +$messages['deletecontactconfirm'] = 'Czy na pewno chcesz usunąć wybrane kontakty?'; +$messages['deletemessagesconfirm'] = 'Czy na pewno chcesz usunąć wybrane wiadomości?'; +$messages['deletefolderconfirm'] = 'Czy na pewno chcesz usunąć wybrany folder?'; +$messages['purgefolderconfirm'] = 'Czy na pewno chcesz usunąć wszystkie wiadomości w tym folderze?'; +$messages['formincomplete'] = 'Proszę uzupełnić formularz!'; +$messages['noemailwarning'] = 'Wpisz poprawny adres e-mail!'; +$messages['nonamewarning'] = 'Podaj imię!'; +$messages['nopagesizewarning'] = 'Podaj poprawną wartość!'; +$messages['norecipientwarning'] = 'Podaj conajmniej jednego odbiorcę!'; +$messages['nosubjectwarning'] = 'Nie podałeś tematu wiadomości. Czy chcesz go teraz uzupełnić?'; +$messages['nobodywarning'] = 'Ta wiadomość jest pusta, czy mimo to chesz ją wysłać?'; +$messages['notsentwarning'] = 'Wiadomość nie została wysłana. czy chesz usunąć tą wiadomość?'; +$messages['noldapserver'] = 'Proszę wybrać serwer LDAP!'; +$messages['nocontactsreturned'] = 'Nie znaleziono kontaktów!'; +$messages['nosearchname'] = 'Proszę podać nazwę kontaktu lub jego adres email.'; +$messages['searchsuccessful'] = 'Znaleziono $nr wiadomości'; +$messages['searchnomatch'] = 'Nic nie znaleziono.'; +$messages['searching'] = 'Szukam...'; +$messages['checking'] = 'Sprawdzanie...'; +$messages['nospellerrors'] = 'Nie znaleziono błędów w pisowni.'; +$messages['folderdeleted'] = 'Folder został pomyślnie usunięty.'; +$messages['deletedsuccessfully'] = 'Usunięto'; +$messages['converting'] = 'Konwertuję wiadomość'; +$messages['messageopenerror'] = 'Nie można załadować wiadomości z serwera'; +$messages['fileuploaderror'] = 'Załączanie pliku nie powiodło się'; +$messages['filesizeerror'] = 'Plik przekracza maksymalną wielkość $size'; +$messages['copysuccess'] = 'Pomyślnie skopiowano $nr adres(ów)'; +$messages['copyerror'] = 'Nie można skopiować żadnego adresu'; +$messages['sourceisreadonly'] = 'Żródło adresu jest tylko do odczytu'; +$messages['errorsavingcontact'] = 'Nie można było zapisać adresu kontaktu'; + +?> \ No newline at end of file diff --git a/program/localization/tr/labels.inc b/program/localization/tr/labels.inc new file mode 100644 index 0000000..088a62a --- /dev/null +++ b/program/localization/tr/labels.inc @@ -0,0 +1,168 @@ + | + +-----------------------------------------------------------------------+ + + @version $Id: labels.inc 466 2007-02-06 09:17:01Z tomekp $ + +*/ + +$labels = array(); +$labels['welcome'] = '$product \'a hoşgeldiniz'; +$labels['username'] = 'Kullanıcı Adı'; +$labels['password'] = 'Şifre'; +$labels['server'] = 'Sunucu'; +$labels['login'] = 'Oturum Aç'; +$labels['logout'] = 'Oturumu Kapat'; +$labels['mail'] = 'E-Posta'; +$labels['settings'] = 'Kişisel Ayarlar'; +$labels['addressbook'] = 'Rehber'; +$labels['inbox'] = 'Gelenler'; +$labels['drafts'] = 'Taslaklar'; +$labels['sent'] = 'Gönderilenler'; +$labels['trash'] = 'Çöp Kutusu'; +$labels['junk'] = 'Gereksiz(spam)'; +$labels['subject'] = 'Konu'; +$labels['from'] = 'Gönderen'; +$labels['to'] = 'Alıcı'; +$labels['cc'] = 'Karbon Kopya'; +$labels['bcc'] = 'Gizli Karbon Kopya'; +$labels['replyto'] = 'Yanıtların Gönderileceği Adres'; +$labels['date'] = 'Tarih'; +$labels['size'] = 'Boyut'; +$labels['priority'] = 'Öncelik'; +$labels['organization'] = 'Kuruluş'; +$labels['reply-to'] = 'Yanıtların Gönderileceği Adres'; +$labels['mailboxlist'] = 'Klasörler'; +$labels['messagesfromto'] = '$count Mesajın $from - $to Arasındaki Mesajlar'; +$labels['messagenrof'] = '$count Mesajın $nr .'; +$labels['moveto'] = 'Şuraya taşı...'; +$labels['download'] = 'İndir'; +$labels['filename'] = 'Dosya Adı'; +$labels['filesize'] = 'Dosya Boyutu'; +$labels['preferhtml'] = 'HTML görüntülemeyi destekle'; +$labels['htmlmessage'] = 'HTML Mesaj'; +$labels['prettydate'] = 'Tarihi kısaltarak göster'; +$labels['addtoaddressbook'] = 'Rehbere Ekle'; +$labels['sun'] = 'Pzr.'; +$labels['mon'] = 'Pts.'; +$labels['tue'] = 'Salı'; +$labels['wed'] = 'Çarş.'; +$labels['thu'] = 'Perş.'; +$labels['fri'] = 'Cuma'; +$labels['sat'] = 'C.tesi'; +$labels['sunday'] = 'Pazar'; +$labels['monday'] = 'Pazartesi'; +$labels['tuesday'] = 'Salı'; +$labels['wednesday'] = 'Çarşamba'; +$labels['thursday'] = 'Perşembe'; +$labels['friday'] = 'Cuma'; +$labels['saturday'] = 'Cumartesi'; +$labels['today'] = 'Bugün'; +$labels['checkmail'] = 'Yeni posta olup olmadığını kontrol et'; +$labels['writenewmessage'] = 'Yeni posta oluştur'; +$labels['replytomessage'] = 'Postayı yanıtla'; +$labels['replytoallmessage'] = 'Bu postanın gönderildiği herkesi yanıtla'; +$labels['forwardmessage'] = 'Postayı ilet'; +$labels['deletemessage'] = 'Çöp Kutusuna At'; +$labels['printmessage'] = 'Yazdır'; +$labels['previousmessages'] = 'Önceki postaları göster'; +$labels['nextmessages'] = 'Sonraki postaları göster'; +$labels['backtolist'] = 'Posta kutusuna dön'; +$labels['viewsource'] = 'Kaynağı göster'; +$labels['select'] = 'Seç'; +$labels['all'] = 'Hepsi'; +$labels['none'] = 'Hiçbiri'; +$labels['unread'] = 'Okunmamış'; +$labels['compact'] = 'Kompakt'; +$labels['empty'] = 'Boşalt'; +$labels['purge'] = 'Sil'; +$labels['quota'] = 'Disk kullanımı'; +$labels['unknown'] = 'bilinmeyen'; +$labels['unlimited'] = 'sınırsız'; +$labels['quicksearch'] = 'Hızlı arama'; +$labels['resetsearch'] = 'Aramayı sıfırla'; +$labels['compose'] = 'Yeni posta oluştur'; +$labels['savemessage'] = 'Taslak olarak kaydet'; +$labels['sendmessage'] = 'Postayı gönder'; +$labels['addattachment'] = 'Dosya ekle'; +$labels['charset'] = 'Karakter seti'; +$labels['returnreceipt'] = 'Return receipt'; +$labels['checkspelling'] = 'Dilbilgisi kontrolu yap'; +$labels['resumeediting'] = 'Düzenlemeye devam et'; +$labels['revertto'] = 'Revert to'; +$labels['attachments'] = 'Ekler'; +$labels['upload'] = 'Yükle'; +$labels['close'] = 'Kapat'; +$labels['low'] = 'Düşük'; +$labels['lowest'] = 'Çok düşük'; +$labels['normal'] = 'Normal'; +$labels['high'] = 'Yüksek'; +$labels['highest'] = 'Çok yüksek'; +$labels['nosubject'] = '(Konu Belirtilmemiş)'; +$labels['showimages'] = 'Grafikleri görüntüle'; +$labels['name'] = 'İsmi görüntüle'; +$labels['firstname'] = 'İsim'; +$labels['surname'] = 'Soy isim'; +$labels['email'] = 'E-Mail'; +$labels['addcontact'] = 'Seçili kişiyi rehbere ekle'; +$labels['editcontact'] = 'Kişiyi düzenle'; +$labels['edit'] = 'Düzenle'; +$labels['cancel'] = 'İptal'; +$labels['save'] = 'Kaydet'; +$labels['delete'] = 'Sil'; +$labels['newcontact'] = 'Yeni kişi Kartı Ekle'; +$labels['deletecontact'] = 'Seçili kişileri sil'; +$labels['composeto'] = 'Seçili kişiye posta gönder'; +$labels['contactsfromto'] = '$count Kişinin $from - $to arası '; +$labels['print'] = 'Yazdır'; +$labels['export'] = 'Export'; +$labels['previouspage'] = 'Önceki seti göster'; +$labels['nextpage'] = 'Sonraki seti göster'; +$labels['ldapsearch'] = 'LDAP directory araması'; +$labels['ldappublicsearchname'] = 'Kişi adı'; +$labels['ldappublicsearchtype'] = 'Tam olarak uysun?'; +$labels['ldappublicserverselect'] = 'Serverleri seç'; +$labels['ldappublicsearchfield'] = 'Arama açık'; +$labels['ldappublicsearchform'] = 'Kişi ara'; +$labels['ldappublicsearch'] = 'Ara'; +$labels['settingsfor'] = 'Ayarlar'; +$labels['preferences'] = 'Tercihler'; +$labels['userpreferences'] = 'Kullanıcı tercihleri'; +$labels['editpreferences'] = 'Kullanıcı tercihlerini düzenle'; +$labels['identities'] = 'Kimlikler'; +$labels['manageidentities'] = 'Bu hesap için kimlikleri düzenle'; +$labels['newidentity'] = 'Yeni kimlik'; +$labels['newitem'] = 'Yeni etiket'; +$labels['edititem'] = 'Etiket düzenle'; +$labels['setdefault'] = 'Varsayılan olarak ayarla'; +$labels['language'] = 'Dil'; +$labels['timezone'] = 'Saat dilimi'; +$labels['pagesize'] = 'Bir sayfada kaç posta gösterilsin'; +$labels['signature'] = 'İmza'; +$labels['dstactive'] = 'Yaz saati uygulaması'; +$labels['folder'] = 'Klasör'; +$labels['folders'] = 'Klasörler'; +$labels['foldername'] = 'Klasör ismi'; +$labels['subscribed'] = 'Görülebilir'; +$labels['create'] = 'Yeni Oluştur'; +$labels['createfolder'] = 'Yeni klasör oluştur'; +$labels['rename'] = 'Yeniden adlandır'; +$labels['renamefolder'] = 'Klasörü yeniden adlandır'; +$labels['deletefolder'] = 'Klasörü sil'; +$labels['managefolders'] = 'Klasörleri düzenle'; +$labels['sortby'] = 'Sırala'; +$labels['sortasc'] = 'Azdan çoğa'; +$labels['sortdesc'] = 'Çoktan aza'; + +?> \ No newline at end of file diff --git a/program/localization/tr/messages.inc b/program/localization/tr/messages.inc new file mode 100644 index 0000000..32c4ae7 --- /dev/null +++ b/program/localization/tr/messages.inc @@ -0,0 +1,66 @@ + | + +-----------------------------------------------------------------------+ + + @version $Id: messages.inc 466 2007-02-06 09:17:01Z tomekp $ + +*/ + +$messages = array(); +$messages['loginfailed'] = 'Giriş Başarısız'; +$messages['cookiesdisabled'] = 'Tarayıcınız cookileri kabul etmiyor'; +$messages['sessionerror'] = 'Oturumunuz sona ermiş veya hatalı'; +$messages['imaperror'] = 'IMAP Servera bağlanılamadı'; +$messages['nomessagesfound'] = 'Posta kutusunda mesaj bulunamadı'; +$messages['loggedout'] = 'Oturumu başarılı bir şekilde kapattınız. Güle güle!'; +$messages['mailboxempty'] = 'Posta kutusu boş'; +$messages['loading'] = 'Yükleniyor...'; +$messages['loadingdata'] = 'Veriler yükleniyor...'; +$messages['checkingmail'] = 'Yeni posta var mı diye kontrol ediliyor...'; +$messages['sendingmessage'] = 'Posta gönderiliyor...'; +$messages['messagesent'] = 'Posta gönderildi'; +$messages['savingmessage'] = 'Posta kaydediliyor...'; +$messages['messagesaved'] = 'Posta taslaklara kaydedildi'; +$messages['successfullysaved'] = 'Kaydedildi'; +$messages['addedsuccessfully'] = 'Kişi rehbere eklendi'; +$messages['contactexists'] = 'Rehberde bu posta adresine sahip biri zaten var'; +$messages['blockedimages'] = 'Gizliliğinizi korumak amacıyla postadaki grafikler bloke edildi.'; +$messages['encryptedmessage'] = 'Bu şifrelenmiş bir posta ve bu nedenle gösterilemiyor. Özür dilerim!'; +$messages['nocontactsfound'] = 'Kişi bulunamadı'; +$messages['sendingfailed'] = 'Posta gönderilemedi'; +$messages['errorsaving'] = 'Kaydederken bir problem oluştu'; +$messages['errormoving'] = 'Posta taşınamadı'; +$messages['errordeleting'] = 'Posta silinemedi'; +$messages['deletecontactconfirm'] = 'Seçili posta(lar)ı silmeyi gerçekten istiyor musunuz?'; +$messages['deletefolderconfirm'] = 'Bu klasörü silmeyi gerçekten istiyor musunuz?'; +$messages['purgefolderconfirm'] = 'Bu klasördeki tüm postaları silmeyi gerçekten istiyor musnuz?'; +$messages['formincomplete'] = 'Form tam olarak doldurulmadı'; +$messages['noemailwarning'] = 'Lütfen geçerli bir posta adresi girin'; +$messages['nonamewarning'] = 'Lütfen bir isim girin'; +$messages['nopagesizewarning'] = 'Lütfen bir sayfa boyutu girin'; +$messages['norecipientwarning'] = 'Lütfen en az bir alıcı belirtin'; +$messages['nosubjectwarning'] = '"Konu" kutusu boş bırakılmış. Şimdi bir konu belirtmek ister misiniz?'; +$messages['nobodywarning'] = 'Postayı boş olarak gönder?'; +$messages['notsentwarning'] = 'Posta gönderilmedi. Postanızı iptal etmek istiyor musunuz?'; +$messages['noldapserver'] = 'Lütfen arama için bir Ldap sunucu seçin'; +$messages['nocontactsreturned'] = 'Kişi bulunamadı'; +$messages['nosearchname'] = 'Lütfen bir kişi ismi veya posta adresi girin'; +$messages['searchsuccessful'] = '$nr tane posta bulundu'; +$messages['searchnomatch'] = 'Aramanıza uygun hiçbir sonuç bulunamadı'; +$messages['searching'] = 'Aranıyor...'; +$messages['checking'] = 'Kontrol ediliyor...'; +$messages['nospellerrors'] = 'Yazım hatası bulunmadı'; +$messages['folderdeleted'] = 'Klasör başarılı bir şekilde silindi'; + +?> \ No newline at end of file diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 5628ad7..c86da77 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -15,7 +15,7 @@ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ - $Id: func.inc 575 2007-05-18 12:35:28Z thomasb $ + $Id: func.inc 587 2007-05-28 19:21:36Z thomasb $ */ @@ -460,7 +460,7 @@ function rcmail_message_list($attrib) $uid_param = $mbox==$CONFIG['drafts_mbox'] ? '_draf_uid' : '_uid'; $cont = Q(rcube_imap::decode_mime_string($header->$col, $header->charset)); if (empty($cont)) $cont = Q(rcube_label('nosubject')); - $cont = sprintf('%s', Q(rcmail_url($action, array($uid_param=>$header->uid, '_mbox'=>$mbox))), $cont); + $cont = sprintf('%s', Q(rcmail_url($action, array($uid_param=>$header->uid, '_mbox'=>$mbox))), $cont); } else if ($col=='size') $cont = show_bytes($header->$col); @@ -546,7 +546,7 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE) $uid_param = $mbox==$CONFIG['drafts_mbox'] ? '_draf_uid' : '_uid'; $cont = Q(rcube_imap::decode_mime_string($header->$col, $header->charset)); if (!$cont) $cont = Q(rcube_label('nosubject')); - $cont = sprintf('%s', Q(rcmail_url($action, array($uid_param=>$header->uid, '_mbox'=>$mbox))), $cont); + $cont = sprintf('%s', Q(rcmail_url($action, array($uid_param=>$header->uid, '_mbox'=>$mbox))), $cont); } else if ($col=='size') $cont = show_bytes($header->$col);