* @return Horde_Data_Driver The newly created concrete instance.
* @throws Horde_Data_Exception
*/
- public function factory($format, array $params = array())
+ static public function factory($format, array $params = array())
{
$format = ucfirst(strtolower(basename($format)));
$class = __CLASS__ . '_' . $format;
*
* @var string
*/
- protected $_contentType = 'text/comma-separated-values';
+ protected $_contentType = 'application/csv';
/**
* File extension.
}
/**
- * Tries to discover the CSV file's parameters.
- *
- * @param string $filename The name of the file to investigate.
- *
- * @return array An associative array with the following possible keys:
- * <pre>
- * 'sep': The field separator
- * 'quote': The quoting character
- * 'fields': The number of fields (columns)
- * </pre>
- */
- public function discoverFormat($filename)
- {
- return Horde_File_Csv::discoverFormat($filename);
- }
-
- /**
* Imports and parses a CSV file.
*
* @param string $filename The name of the file to parse.
* @return array A two-dimensional array of all imported data rows. If
* $header was true the rows are associative arrays with the
* field/column names as the keys.
- * @throws Horde_File_Csv_Exception
+ * @throws Horde_Data_Exception
*/
public function importFile($filename, $header = false, $sep = ',',
$quote = '', $fields = null,
}
$conf = array(
- 'crlf' => $crlf,
- 'fields' => $fields,
+ 'length' => $fields,
'quote' => $quote,
- 'sep' => $sep
+ 'separator' => $sep
);
- /* Strip and keep the first line if it contains the field
- * names. */
+ $fp = @fopen($filename, 'r');
+ if (!$fp) {
+ throw new Hode_Data_Exception('Cannot open file');
+ }
+
+ /* Strip and keep the first line if it contains the field names. */
if ($header) {
- $head = Horde_File_Csv::read($filename, $conf);
+ $head = Horde_Util::getCsv($fp, $conf);
+ if (!$head) {
+ return array();
+ }
if (!empty($charset)) {
$head = Horde_String::convertCharset($head, $charset, $this->_charset);
}
}
$data = array();
- while ($line = Horde_File_Csv::read($filename, $conf)) {
+ while ($line = Horde_Util::getCsv($fp, $conf)) {
if (!empty($charset)) {
$line = Horde_String::convertCharset($line, $charset, $this->_charset);
}
}
}
- $fp = Horde_File_Csv::getPointer($filename, $conf);
- if ($fp) {
- rewind($fp);
- }
-
- $this->_warnings = Horde_File_Csv::warning();
-
return $data;
}
}
$_SESSION['import_data']['file_name'] = $file_name;
- /* Try to discover the file format ourselves. */
- $conf = $this->discoverFormat($file_name);
- if (!$conf) {
- $conf = array('sep' => ',');
- }
- $_SESSION['import_data'] = array_merge($_SESSION['import_data'], $conf);
-
/* Check if charset was specified. */
$_SESSION['import_data']['charset'] = $this->_vars->charset;
--- /dev/null
+<?php
+/**
+ * Horde_Data test suite.
+ *
+ * @author Jan Schneider <jan@horde.org>
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @category Horde
+ * @package Data
+ * @subpackage UnitTests
+ */
+
+/**
+ * Define the main method
+ */
+if (!defined('PHPUnit_MAIN_METHOD')) {
+ define('PHPUnit_MAIN_METHOD', 'Horde_Data_AllTests::main');
+}
+
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
+
+/**
+ * @package Horde_Data
+ * @subpackage UnitTests
+ */
+class Horde_Data_AllTests extends Horde_Test_AllTests
+{
+}
+
+Horde_Data_AllTests::init('Horde_Data', __FILE__);
+
+if (PHPUnit_MAIN_METHOD == 'Horde_Data_AllTests::main') {
+ Horde_Data_AllTests::main();
+}
--- /dev/null
+<?php
+/**
+ * @author Jan Schneider <jan@horde.org>
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @category Horde
+ * @package Data
+ * @subpackage UnitTests
+ */
+
+class Horde_Data_CsvTest extends PHPUnit_Framework_TestCase
+{
+ public function testImportFile()
+ {
+ $data = new Horde_Data_Csv();
+
+ $expected = array(array(0 => 'one',
+ 1 => 'two',
+ 2 => 'three four',
+ 3 => 'five'),
+ array(0 => 'six',
+ 1 => 'seven',
+ 2 => 'eight nine',
+ 3 => 'ten'));
+ $this->assertEquals($expected,
+ $data->importFile(dirname(__FILE__) . '/fixtures/simple_dos.csv', false, ',', '', 4));
+ $this->assertEquals($expected,
+ $data->importFile(dirname(__FILE__) . '/fixtures/simple_unix.csv', false, ',', '', 4));
+
+ $expected = array(array('one' => 'six',
+ 'two' => 'seven',
+ 'three four' => 'eight nine',
+ 'five' => 'ten'));
+ $this->assertEquals($expected,
+ $data->importFile(dirname(__FILE__) . '/fixtures/simple_dos.csv', true, ',', '', 4));
+ $this->assertEquals($expected,
+ $data->importFile(dirname(__FILE__) . '/fixtures/simple_unix.csv', true, ',', '', 4));
+ }
+}
+++ /dev/null
---TEST--
-Simple CSV files
---FILE--
-<?php
-
-require 'Horde.php';
-require 'Horde/Data.php';
-
-$data = Horde_Data::factory('csv');
-var_dump($data->importFile(dirname(__FILE__) . '/simple_dos.csv', false, '', '', 4));
-var_dump($data->importFile(dirname(__FILE__) . '/simple_unix.csv', false, '', '', 4));
-var_dump($data->importFile(dirname(__FILE__) . '/simple_dos.csv', true, '', '', 4));
-var_dump($data->importFile(dirname(__FILE__) . '/simple_unix.csv', true, '', '', 4));
-
-?>
---EXPECT--
-array(2) {
- [0]=>
- array(4) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(10) "three four"
- [3]=>
- string(4) "five"
- }
- [1]=>
- array(4) {
- [0]=>
- string(3) "six"
- [1]=>
- string(5) "seven"
- [2]=>
- string(10) "eight nine"
- [3]=>
- string(4) " ten"
- }
-}
-array(2) {
- [0]=>
- array(4) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(10) "three four"
- [3]=>
- string(4) "five"
- }
- [1]=>
- array(4) {
- [0]=>
- string(3) "six"
- [1]=>
- string(5) "seven"
- [2]=>
- string(10) "eight nine"
- [3]=>
- string(4) " ten"
- }
-}
-array(1) {
- [0]=>
- array(4) {
- ["one"]=>
- string(3) "six"
- ["two"]=>
- string(5) "seven"
- ["three four"]=>
- string(10) "eight nine"
- ["five"]=>
- string(4) " ten"
- }
-}
-array(1) {
- [0]=>
- array(4) {
- ["one"]=>
- string(3) "six"
- ["two"]=>
- string(5) "seven"
- ["three four"]=>
- string(10) "eight nine"
- ["five"]=>
- string(4) " ten"
- }
-}
\ No newline at end of file
--- /dev/null
+one,two,three four,five
+six,seven,eight nine, ten
--- /dev/null
+one,two,three four,five
+six,seven,eight nine, ten
+++ /dev/null
-one,two,three four,five
-six,seven,eight nine, ten
+++ /dev/null
-one,two,three four,five
-six,seven,eight nine, ten
+++ /dev/null
-<?php
-/**
- * Provide reading and creating of CSV data and files.
- *
- * Copyright 2002-2003 Tomas Von Veschler Cox <cox@idecnet.com>
- * Copyright 2005-2010 The Horde Project (http://www.horde.org/)
- *
- * This source file is subject to version 2.0 of the PHP license, that is
- * bundled with this package in the file LICENSE, and is available at through
- * the world-wide-web at http://www.php.net/license/2_02.txt. If you did not
- * receive a copy of the PHP license and are unable to obtain it through the
- * world-wide-web, please send a note to license@php.net so we can mail you a
- * copy immediately.
- *
- * @author Tomas Von Veschler Cox <cox@idecnet.com>
- * @author Jan Schneider <jan@horde.org>
- * @category Horde
- * @package Horde_File_Csv
- */
-class Horde_File_Csv
-{
- /** Mode to use for reading from files */
- const MODE_READ = 'rb';
-
- /** Mode to use for truncating files, then writing */
- const MODE_WRITE = 'wb';
-
- /** Mode to use for appending to files */
- const MODE_APPEND = 'ab';
-
- /**
- * Discovers the format of a CSV file (the number of fields, the
- * separator, the quote string, and the line break).
- *
- * We can't use the auto_detect_line_endings PHP setting, because it's not
- * supported by fgets() contrary to what the manual says.
- *
- * @param string $file The CSV file name
- * @param array $extraSeps Extra separators that should be checked for.
- *
- * @return array The format hash.
- * @throws Horde_File_Csv_Exception
- */
- static public function discoverFormat($file, $extraSeps = array())
- {
- if (!$fp = @fopen($file, 'r')) {
- throw new Horde_File_Csv_Exception('Could not open file: ' . $file);
- }
-
- $seps = array("\t", ';', ':', ',', '~');
- $seps = array_merge($seps, $extraSeps);
- $conf = $matches = array();
- $crlf = null;
-
- /* Take the first 10 lines and store the number of ocurrences for each
- * separator in each line. */
- for ($i = 0; ($i < 10) && ($line = fgets($fp));) {
- /* Do we have Mac line endings? */
- $lines = preg_split('/\r(?!\n)/', $line, 10);
- $j = 0;
- $c = count($lines);
- if ($c > 1) {
- $crlf = "\r";
- }
- while ($i < 10 && $j < $c) {
- $line = $lines[$j];
- if (!isset($crlf)) {
- foreach (array("\r\n", "\n") as $c) {
- if (substr($line, -strlen($c)) == $c) {
- $crlf = $c;
- break;
- }
- }
- }
- ++$i;
- ++$j;
- foreach ($seps as $sep) {
- $matches[$sep][$i] = substr_count($line, $sep);
- }
- }
- }
-
- if (isset($crlf)) {
- $conf['crlf'] = $crlf;
- }
-
- /* Group the results by amount of equal occurrences. */
- $amount = $fields = array();
- foreach ($matches as $sep => $lines) {
- $times = array(0 => 0);
- foreach ($lines as $num) {
- if ($num > 0) {
- $times[$num] = (isset($times[$num])) ? $times[$num] + 1 : 1;
- }
- }
- arsort($times);
- $fields[$sep] = key($times);
- $amount[$sep] = $times[key($times)];
- }
- arsort($amount);
- $sep = key($amount);
-
- $conf['fields'] = $fields[$sep] + 1;
- $conf['sep'] = $sep;
-
- /* Test if there are fields with quotes around in the first 10
- * lines. */
- $quotes = '"\'';
- $quote = '';
- rewind($fp);
- for ($i = 0; ($i < 10) && ($line = fgets($fp)); ++$i) {
- if (preg_match("|$sep([$quotes]).*([$quotes])$sep|U", $line, $match)) {
- if ($match[1] == $match[2]) {
- $quote = $match[1];
- break;
- }
- }
- if (preg_match("|^([$quotes]).*([$quotes])$sep|", $line, $match) ||
- preg_match("|([$quotes]).*([$quotes])$sep\s$|Us", $line, $match)) {
- if ($match[1] == $match[2]) {
- $quote = $match[1];
- break;
- }
- }
- }
- $conf['quote'] = $quote;
-
- fclose($fp);
-
- // XXX What about trying to discover the "header"?
- return $conf;
- }
-
- /**
- * Reads a row from a CSV file and returns it as an array.
- *
- * This method normalizes linebreaks to single newline characters (0x0a).
- *
- * @param string $file The name of the CSV file.
- * @param array $conf The configuration for the CSV file.
- *
- * @return array|boolean The CSV data or false if no more data available.
- * @throws Horde_File_Csv_Exception
- */
- static public function read($file, &$conf)
- {
- $fp = self::getPointer($file, $conf, self::MODE_READ);
-
- $line = fgets($fp);
- $line_length = strlen($line);
-
- /* Use readQuoted() if we have Mac line endings. */
- if (preg_match('/\r(?!\n)/', $line)) {
- fseek($fp, -$line_length, SEEK_CUR);
- return self::readQuoted($file, $conf);
- }
-
- /* Normalize line endings. */
- $line = str_replace("\r\n", "\n", $line);
- if (!strlen(trim($line))) {
- return false;
- }
-
- self::_line(self::_line() + 1);
-
- if ($conf['fields'] == 1) {
- return array($line);
- }
-
- $fields = explode($conf['sep'], $line);
- if ($conf['quote']) {
- $last = ltrim($fields[count($fields) - 1]);
- /* Fallback to read the line with readQuoted() if we assume that
- * the simple explode won't work right. */
- $last_len = strlen($last);
- if (($last_len &&
- $last[$last_len - 1] == "\n" &&
- $last[0] == $conf['quote'] &&
- $last[strlen(rtrim($last)) - 1] != $conf['quote']) ||
- (count($fields) != $conf['fields'])
- // XXX perhaps there is a separator inside a quoted field
- // preg_match("|{$conf['quote']}.*{$conf['sep']}.*{$conf['quote']}|U", $line)
- ) {
- fseek($fp, -$line_length, SEEK_CUR);
- return self::readQuoted($file, $conf);
- } else {
- foreach ($fields as $k => $v) {
- $fields[$k] = self::unquote(trim($v), $conf['quote']);
- }
- }
- } else {
- foreach ($fields as $k => $v) {
- $fields[$k] = trim($v);
- }
- }
-
- if (count($fields) < $conf['fields']) {
- self::warning(sprintf(Horde_File_Csv_Translation::t("Wrong number of fields in line %d. Expected %d, found %d."), self::_line(), $conf['fields'], count($fields)));
- $fields = array_merge($fields, array_fill(0, $conf['fields'] - count($fields), ''));
- } elseif (count($fields) > $conf['fields']) {
- self::warning(sprintf(Horde_File_Csv_Translation::t("More fields found in line %d than the expected %d."), self::_line(), $conf['fields']));
- array_splice($fields, $conf['fields']);
- }
-
- return $fields;
- }
-
- /**
- * Reads a row from a CSV file and returns it as an array.
- *
- * This method is able to read fields with multiline data and normalizes
- * linebreaks to single newline characters (0x0a).
- *
- * @param string $file The name of the CSV file.
- * @param array $conf The configuration for the CSV file.
- *
- * @return array|boolean The CSV data or false if no more data available.
- * @throws Horde_File_Csv_Exception
- */
- static public function readQuoted($file, &$conf)
- {
- $fp = self::getPointer($file, $conf, self::MODE_READ);
-
- /* A buffer with all characters of the current field read so far. */
- $buff = '';
- /* The current character. */
- $c = null;
- /* The read fields. */
- $ret = false;
- /* The number of the current field. */
- $i = 0;
- /* Are we inside a quoted field? */
- $in_quote = false;
- /* Did we just process an escaped quote? */
- $quote_escaped = false;
- /* Is the last processed quote the first of a field? */
- $first_quote = false;
-
- while (($ch = fgetc($fp)) !== false) {
- /* Normalize line breaks. */
- if ($ch == $conf['crlf']) {
- $ch = "\n";
- } elseif (strlen($conf['crlf']) == 2 && $ch == $conf['crlf'][0]) {
- $next = fgetc($fp);
- if (!$next) {
- break;
- }
- if ($next == $conf['crlf'][1]) {
- $ch = "\n";
- }
- }
-
- /* Previous character. */
- $prev = $c;
- /* Current character. */
- $c = $ch;
-
- /* Simple character. */
- if ($c != $conf['quote'] &&
- $c != $conf['sep'] &&
- $c != "\n") {
- $buff .= $c;
- if (!$i) {
- $i = 1;
- }
- $first_quote = $quote_escaped = false;
- continue;
- }
-
- if ($c == $conf['quote'] && !$in_quote) {
- /* Quoted field begins. */
- $in_quote = true;
- $buff = '';
- if (!$i) {
- $i = 1;
- }
- } elseif ($in_quote) {
- /* We do NOT check for the closing quote immediately, but when
- * we got the character AFTER the closing quote. */
- if ($c == $conf['quote'] && $prev == $conf['quote'] &&
- !$quote_escaped) {
- /* Escaped (double) quotes. */
- $first_quote = $quote_escaped = true;
- $prev = null;
- /* Simply skip the second quote. */
- continue;
- } elseif ($c == $conf['sep'] && $prev == $conf['quote']) {
- /* Quoted field ends with a delimiter. */
- $in_quote = $quote_escaped = false;
- $first_quote = true;
- } elseif ($c == "\n") {
- /* We have a linebreak inside the quotes. */
- if (strlen($buff) == 1 &&
- $buff[0] == $conf['quote'] &&
- $quote_escaped && $first_quote) {
- /* A line break after a closing quote of an empty
- * field, field and row end here. */
- $in_quote = false;
- } elseif (strlen($buff) >= 1 &&
- $buff[strlen($buff) - 1] == $conf['quote'] &&
- !$quote_escaped && !$first_quote) {
- /* A line break after a closing quote, field and row
- * end here. This is NOT the closing quote if we
- * either process an escaped (double) quote, or if the
- * quote before the line break was the opening
- * quote. */
- $in_quote = false;
- } else {
- /* Only increment the line number. Line breaks inside
- * quoted fields are part of the field content. */
- self::_line(self::_line() + 1);
- }
- $quote_escaped = false;
- $first_quote = true;
- }
- }
-
- if (!$in_quote &&
- ($c == $conf['sep'] || $c == "\n")) {
- /* End of line or end of field. */
- if ($c == $conf['sep'] &&
- (count($ret) + 1) == $conf['fields']) {
- /* More fields than expected. Forward the line pointer to
- * the EOL and drop the remainder. */
- while ($c !== false && $c != "\n") {
- $c = fgetc($fp);
- }
- self::warning(sprintf('More fields found in line %d than the expected %d.', self::_line(), $conf['fields']));
- }
-
- if ($c == "\n" &&
- $i != $conf['fields']) {
- /* Less fields than expected. */
- if ($i == 0) {
- /* Skip empty lines. */
- return $ret;
- }
- self::warning(sprintf('Wrong number of fields in line %d. Expected %d, found %d.', self::_line(), $conf['fields'], $i));
-
- $ret[] = self::unquote($buff, $conf['quote']);
- return array_merge($ret, array_fill(0, $conf['fields'] - $i, ''));
- }
-
- /* Remove surrounding quotes from quoted fields. */
- $ret[] = ($buff == '"')
- ? ''
- : self::unquote($buff, $conf['quote']);
- if (count($ret) == $conf['fields']) {
- return $ret;
- }
-
- $buff = '';
- ++$i;
- continue;
- }
- $buff .= $c;
- }
-
- return $ret;
- }
-
- /**
- * Writes a hash into a CSV file.
- *
- * @param string $file The name of the CSV file.
- * @param array $fields The CSV data.
- * @param array $conf The configuration for the CSV file.
- *
- * @throws Horde_File_Csv_Exception
- */
- static public function write($file, $fields, &$conf)
- {
- $fp = self::getPointer($file, $conf, self::MODE_WRITE);
-
- if (count($fields) != $conf['fields']) {
- throw new Horde_File_Csv_Exception(sprintf('Wrong number of fields. Expected %d, found %d.', $conf['fields'], count($fields)));
- }
-
- $write = '';
- for ($i = 0; $i < count($fields); ++$i) {
- $write .= (!is_numeric($fields[$i]) && $conf['quote'])
- ? $conf['quote'] . $fields[$i] . $conf['quote']
- : $fields[$i];
- $write .= ($i < (count($fields) - 1))
- ? $conf['sep']
- : $conf['crlf'];
- }
-
- if (!fwrite($fp, $write)) {
- throw new Horde_File_Csv_Exception(sprintf('Cannot write to file "%s"', $file));
- }
-
- fclose($fp);
- }
-
- /**
- * Removes surrounding quotes from a string and normalizes linebreaks.
- *
- * @param string $field The string to unquote.
- * @param string $quote The quote character.
- * @param string $crlf The linebreak character.
- *
- * @return string The unquoted data.
- */
- static public function unquote($field, $quote, $crlf = null)
- {
- /* Skip empty fields (form: ;;) */
- if (!strlen($field)) {
- return $field;
- }
-
- if ($quote && $field[0] == $quote &&
- $field[strlen($field) - 1] == $quote) {
- /* Normalize only for BC. */
- if ($crlf) {
- $field = str_replace($crlf, "\n", $field);
- }
- return substr($field, 1, -1);
- }
-
- return $field;
- }
-
- /**
- * Sets or gets the current line being parsed.
- *
- * @param integer $line If specified, the current line.
- *
- * @return integer The current line.
- */
- static protected function _line($line = null)
- {
- static $current_line = 0;
-
- if (!is_null($line)) {
- $current_line = $line;
- }
-
- return $current_line;
- }
-
- /**
- * Adds a warning to or retrieves and resets the warning stack.
- *
- * @param string A warning string. If not specified, the existing
- * warnings will be returned instead and the warning stack
- * gets emptied.
- *
- * @return array If no parameter has been specified, the list of existing
- * warnings.
- */
- static public function warning($warning = null)
- {
- static $warnings = array();
-
- if (is_null($warning)) {
- $return = $warnings;
- $warnings = array();
- return $return;
- }
-
- $warnings[] = $warning;
- }
-
- /**
- * Returns or creates the file descriptor associated with a file.
- *
- * @param string $file The name of the file
- * @param array $conf The configuration
- * @param string $mode The open mode. self::MODE_READ or
- * self::MODE_WRITE.
- *
- * @return resource The file resource.
- *
- * @throws Horde_File_Csv_Exception
- */
- static public function getPointer($file, &$conf, $mode = self::MODE_READ)
- {
- static $resources = array();
- static $config = array();
-
- if (isset($resources[$file])) {
- $conf = $config[$file];
- return $resources[$file];
- }
-
- if (!is_array($conf)) {
- throw new Horde_File_Csv_Exception('Invalid configuration.');
- }
-
- if (!isset($conf['fields']) || !is_numeric($conf['fields'])) {
- throw new Horde_File_Csv_Exception('The number of fields must be numeric.');
- }
-
- if (isset($conf['sep'])) {
- if (strlen($conf['sep']) != 1) {
- throw new Horde_File_Csv_Exception('The separator must be one single character.');
- }
- } elseif ($conf['fields'] > 1) {
- throw new Horde_File_Csv_Exception('No separator specified.');
- }
-
- if (!empty($conf['quote'])) {
- if (strlen($conf['quote']) != 1) {
- throw new Horde_File_Csv_Exception('The quote character must be one single character.');
- }
- } else {
- $conf['quote'] = '';
- }
-
- if (!isset($conf['crlf'])) {
- $conf['crlf'] = "\n";
- }
-
- $config[$file] = $conf;
-
- $fp = @fopen($file, $mode);
- if (!is_resource($fp)) {
- throw new Horde_File_Csv_Exception(sprintf('Cannot open file "%s".', $file));
- }
- $resources[$file] = $fp;
- self::_line(0);
-
- if (($mode == self::MODE_READ) && !empty($conf['header'])) {
- self::read($file, $conf);
- }
-
- return $fp;
- }
-
-}
+++ /dev/null
-<?php
-/**
- * Exception handler for the Horde_File_Csv package.
- *
- * Copyright 2010 The Horde Project (http://www.horde.org/)
- *
- * This source file is subject to version 2.0 of the PHP license, that is
- * bundled with this package in the file LICENSE, and is available at through
- * the world-wide-web at http://www.php.net/license/2_02.txt. If you did not
- * receive a copy of the PHP license and are unable to obtain it through the
- * world-wide-web, please send a note to license@php.net so we can mail you a
- * copy immediately.
- *
- * @author Michael Slusarz <slusarz@horde.org>
- * @category Horde
- * @package Horde_File_Csv
- */
-class Horde_File_Csv_Exception extends Horde_Exception
-{
-}
+++ /dev/null
-<?php
-/**
- * @package File_Csv
- *
- * Copyright 2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- */
-
-/**
- * Horde_File_Csv_Translation is the translation wrapper class for Horde_File_Csv.
- *
- * @author Jan Schneider <jan@horde.org>
- * @package File_Csv
- */
-class Horde_File_Csv_Translation extends Horde_Translation
-{
- /**
- * Returns the translation of a message.
- *
- * @var string $message The string to translate.
- *
- * @return string The string translation, or the original string if no
- * translation exists.
- */
- static public function t($message)
- {
- self::$_domain = 'Horde_File_Csv';
- self::$_directory = '@data_dir@' == '@'.'data_dir'.'@' ? '../../../../locale' : '@data_dir@/File_Csv/locale';
- return parent::t($message);
- }
-
- /**
- * Returns the plural translation of a message.
- *
- * @param string $singular The singular version to translate.
- * @param string $plural The plural version to translate.
- * @param integer $number The number that determines singular vs. plural.
- *
- * @return string The string translation, or the original string if no
- * translation exists.
- */
- static public function ngettext($singular, $plural, $number)
- {
- self::$_domain = 'Horde_File_Csv';
- self::$_directory = '@data_dir@' == '@'.'data_dir'.'@' ? '../../../../locale' : '@data_dir@/File_Csv/locale';
- return parent::ngettext($singular, $plural, $number);
- }
-}
+++ /dev/null
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Horde Project
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Arabic translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Bulgarian translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Bosnian translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Catalan translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "S'han trobat més camps en la línia %d que els %d esperats. "
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "Nombre erroni de camps en la línia %d. S'esperaven %d i hi ha %d. "
+++ /dev/null
-# Czech translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "Na řádku %d bylo nalezeno více políček než očekávaných %d."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "Chybný počet políček na řádku %d. Očekáváno %d, nalezeno %d."
+++ /dev/null
-# Danish translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "Flere felter fundet i linie %d end det forventede %d."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "Forkert antal felter i linie %d. Forventede %d, fandt %d."
+++ /dev/null
-# German translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "Mehr Felder in Zeile %d als die erwarteten %d gefunden."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "Falsche Anzahl an Feldern in Zeile %d. %d erwartet, %d gefunden."
+++ /dev/null
-# Greek translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# English translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ASCII\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "More fields found in line %d than the expected %d."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "Wrong number of fields in line %d. Expected %d, found %d."
+++ /dev/null
-# Spanish translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "Se han encontrado más campos en la línea %d que los %d esperados."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "Número de campos incorrecto en la línea %d. Se esperaban %d, hay %d."
+++ /dev/null
-# Estonian translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "Reas %d leiti rohkem välju kui eeldatav %d."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "Reas %d on vale arv välju. Peaks olema %d, aga on %d."
+++ /dev/null
-# Basque translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ASCII\n"
-"Content-Transfer-Encoding: 8bit\n"
+++ /dev/null
-# Persian translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Finnish translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "Riviltä %d löytyi enemmän kenttiä kuin odotettu %d."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "Väärä määrä kenttiä rivillä %d. Odotettiin %d, löytyi %d."
+++ /dev/null
-# French translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "Champs supplémentaires trouvés à la ligne %d (attendus %d)."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "Nombre de champs incorrect à la ligne %d. %d attendus, %d trouvés."
+++ /dev/null
-# Galician translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Hebrew translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Croatian translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
-"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "U redu %d ima više polja od očekivanih %d."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "Krivi broj polja u redu %d. Očekivano %d, nađeno %d."
+++ /dev/null
-# Hungarian translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "A %d. sorban több mező volt, mint a várt %d."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "A %d. sorban nem megfelelő a mezők száma. Várt: %d, talált: %d."
+++ /dev/null
-# Indonesian translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ASCII\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Icelandic translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Italian translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "La linea %d contiene più campi di quelli necessari (%d)."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
-"Numeri di campi compilati nella riga %d errato.Previsti %d, trovati %d."
+++ /dev/null
-# Japanese translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "%d 行目に予想した数 %d 以上の項目があります。"
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "%d 行目で間違った項目数。正しくは %d、指定されたのは %d。"
+++ /dev/null
-# Khmer translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Korean translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Lithuanian translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%"
-"100<10 || n%100>=20) ? 1 : 2);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "Eilutėje %d rasta daugiau laukų nei tikėtasi %d."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
-"%d eilutė sudaryta iš neteisingo laukų skaičiaus. Turi būti %d, o yra %d."
+++ /dev/null
-# Latvian translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : "
-"2);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Macedonian translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Norwegian Bokmal translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Dutch translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ASCII\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+++ /dev/null
-# Norwegian Nynorsk translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Polish translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Portuguese translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "Encontrados mais campos na linha %d do que os %d esperados."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
-"Número de campos errado na linha %d. Esperavam-se %d, encontraram-se %d."
+++ /dev/null
-# Portuguese translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "Mais campos encontrados na linha %d que o número experado %d."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "Número incorreto de campos na linha %d. Esperados %d, encontrados %d."
+++ /dev/null
-# Romanian translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ASCII\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
-"20)) ? 1 : 2;\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Russian translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
-"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr ""
+++ /dev/null
-# Slovak translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "V riadku %d bolo nájdených viac polí ako očakávaných %d."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "Nesprávny počet polí v riadku %d. Očakávané %d, nájdené %d."
+++ /dev/null
-# Slovenian translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
-"%100==4 ? 2 : 3);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "V vrsti %d je najdenih več polj od predvidenih %d."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "Napačno število polj v %d vrsti. Pričakovanih %d, najdenih %d."
+++ /dev/null
-# Swedish translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr ""
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "Fel antal fält på rad %d. Förväntade %d, hittade %d."
+++ /dev/null
-# Turkish translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "Alanda beklenenden fazla satır var. Satır:%d Beklenen:%d"
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "%d satırında hatalı sayıda alan var. %d bekleniyordu, %d alan bulundu."
+++ /dev/null
-# Ukrainian translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
-"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "Знайдено більше полів в рядку %d, ніж очікувалось - %d."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "Неправильна кількість полів в рядку %d. Потрібно %d, знайдено %d."
+++ /dev/null
-# Chinese translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "在第 %d 行找到多于预期 %d 的字段。"
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "第%d行中的字段数错误。期望值 %d,找到 %d。"
+++ /dev/null
-# Chinese translations for Horde_File_Csv module.
-# Copyright (C) 2010 Horde Project
-# This file is distributed under the same license as the Horde_File_Csv module.
-# Automatically generated, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Horde_File_Csv\n"
-"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
-"POT-Creation-Date: 2010-10-13 01:27+0200\n"
-"PO-Revision-Date: 2010-10-13 01:27+0200\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: i18n@lists.horde.org\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: lib/Horde/File/Csv.php:202
-#, php-format
-msgid "More fields found in line %d than the expected %d."
-msgstr "在第%d行找到的欄位數目已超出預期%d."
-
-#: lib/Horde/File/Csv.php:199
-#, php-format
-msgid "Wrong number of fields in line %d. Expected %d, found %d."
-msgstr "第 %d 行的欄位數目不正確. 應該要有 %d 個欄位,只找到 %d 個欄位."
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<package packagerversion="1.9.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
- <name>File_Csv</name>
- <channel>pear.horde.org</channel>
- <summary>Reads and writes CSV files</summary>
- <description>This package allows reading and creating of CSV data and files. It
-is a fork of the File_CSV class of PEAR's File package.</description>
- <lead>
- <name>Jan Schneider</name>
- <user>jan</user>
- <email>jan@horde.org</email>
- <active>yes</active>
- </lead>
- <date>2010-10-22</date>
- <time>19:03:02</time>
- <version>
- <release>0.2.0</release>
- <api>0.2.0</api>
- </version>
- <stability>
- <release>beta</release>
- <api>beta</api>
- </stability>
- <license uri="http://www.php.net/license">PHP</license>
- <notes>
-* Initial Horde 4 Package
- </notes>
- <contents>
- <dir baseinstalldir="/" name="/">
- <dir name="lib">
- <dir name="Horde">
- <dir name="File">
- <dir name="Csv">
- <file name="Exception.php" role="php" />
- <file name="Translation.php" role="php">
- <tasks:replace from="@data_dir@" to="data_dir" type="pear-config" />
- </file>
- </dir> <!-- /lib/Horde/File/Csv -->
- <file name="Csv.php" role="php" />
- </dir> <!-- /lib/Horde/File -->
- </dir> <!-- /lib/Horde -->
- </dir> <!-- /lib -->
- <dir name="locale">
- <dir name="ar">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/ar/LC_MESSAGES -->
- </dir> <!-- /locale/ar -->
- <dir name="bg">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/bg/LC_MESSAGES -->
- </dir> <!-- /locale/bg -->
- <dir name="bs">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/bs/LC_MESSAGES -->
- </dir> <!-- /locale/bs -->
- <dir name="ca">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/ca/LC_MESSAGES -->
- </dir> <!-- /locale/ca -->
- <dir name="cs">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/cs/LC_MESSAGES -->
- </dir> <!-- /locale/cs -->
- <dir name="da">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/da/LC_MESSAGES -->
- </dir> <!-- /locale/da -->
- <dir name="de">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/de/LC_MESSAGES -->
- </dir> <!-- /locale/de -->
- <dir name="el">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/el/LC_MESSAGES -->
- </dir> <!-- /locale/el -->
- <dir name="en">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/en/LC_MESSAGES -->
- </dir> <!-- /locale/en -->
- <dir name="es">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/es/LC_MESSAGES -->
- </dir> <!-- /locale/es -->
- <dir name="et">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/et/LC_MESSAGES -->
- </dir> <!-- /locale/et -->
- <dir name="eu">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/eu/LC_MESSAGES -->
- </dir> <!-- /locale/eu -->
- <dir name="fa">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/fa/LC_MESSAGES -->
- </dir> <!-- /locale/fa -->
- <dir name="fi">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/fi/LC_MESSAGES -->
- </dir> <!-- /locale/fi -->
- <dir name="fr">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/fr/LC_MESSAGES -->
- </dir> <!-- /locale/fr -->
- <dir name="gl">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/gl/LC_MESSAGES -->
- </dir> <!-- /locale/gl -->
- <dir name="he">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/he/LC_MESSAGES -->
- </dir> <!-- /locale/he -->
- <dir name="hr">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/hr/LC_MESSAGES -->
- </dir> <!-- /locale/hr -->
- <dir name="hu">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/hu/LC_MESSAGES -->
- </dir> <!-- /locale/hu -->
- <dir name="id">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/id/LC_MESSAGES -->
- </dir> <!-- /locale/id -->
- <dir name="is">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/is/LC_MESSAGES -->
- </dir> <!-- /locale/is -->
- <dir name="it">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/it/LC_MESSAGES -->
- </dir> <!-- /locale/it -->
- <dir name="ja">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/ja/LC_MESSAGES -->
- </dir> <!-- /locale/ja -->
- <dir name="km">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/km/LC_MESSAGES -->
- </dir> <!-- /locale/km -->
- <dir name="ko">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/ko/LC_MESSAGES -->
- </dir> <!-- /locale/ko -->
- <dir name="lt">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/lt/LC_MESSAGES -->
- </dir> <!-- /locale/lt -->
- <dir name="lv">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/lv/LC_MESSAGES -->
- </dir> <!-- /locale/lv -->
- <dir name="mk">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/mk/LC_MESSAGES -->
- </dir> <!-- /locale/mk -->
- <dir name="nb">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/nb/LC_MESSAGES -->
- </dir> <!-- /locale/nb -->
- <dir name="nl">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/nl/LC_MESSAGES -->
- </dir> <!-- /locale/nl -->
- <dir name="nn">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/nn/LC_MESSAGES -->
- </dir> <!-- /locale/nn -->
- <dir name="pl">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/pl/LC_MESSAGES -->
- </dir> <!-- /locale/pl -->
- <dir name="pt">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/pt/LC_MESSAGES -->
- </dir> <!-- /locale/pt -->
- <dir name="pt_BR">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/pt_BR/LC_MESSAGES -->
- </dir> <!-- /locale/pt_BR -->
- <dir name="ro">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/ro/LC_MESSAGES -->
- </dir> <!-- /locale/ro -->
- <dir name="ru">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/ru/LC_MESSAGES -->
- </dir> <!-- /locale/ru -->
- <dir name="sk">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/sk/LC_MESSAGES -->
- </dir> <!-- /locale/sk -->
- <dir name="sl">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/sl/LC_MESSAGES -->
- </dir> <!-- /locale/sl -->
- <dir name="sv">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/sv/LC_MESSAGES -->
- </dir> <!-- /locale/sv -->
- <dir name="tr">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/tr/LC_MESSAGES -->
- </dir> <!-- /locale/tr -->
- <dir name="uk">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/uk/LC_MESSAGES -->
- </dir> <!-- /locale/uk -->
- <dir name="zh_CN">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/zh_CN/LC_MESSAGES -->
- </dir> <!-- /locale/zh_CN -->
- <dir name="zh_TW">
- <dir name="LC_MESSAGES">
- <file name="Horde_File_Csv.mo" role="data" />
- <file name="Horde_File_Csv.po" role="data" />
- </dir> <!-- /locale/zh_TW/LC_MESSAGES -->
- </dir> <!-- /locale/zh_TW -->
- <file name="Horde_File_Csv.pot" role="data" />
- </dir> <!-- /locale -->
- <dir name="test">
- <dir name="Horde">
- <dir name="Csv">
- <file name="001.csv" role="test" />
- <file name="001.phpt" role="test" />
- <file name="002.csv" role="test" />
- <file name="002.phpt" role="test" />
- <file name="003.csv" role="test" />
- <file name="003.phpt" role="test" />
- <file name="004.csv" role="test" />
- <file name="004.phpt" role="test" />
- <file name="005.csv" role="test" />
- <file name="005.phpt" role="test" />
- <file name="bug_3839.csv" role="test" />
- <file name="bug_3839.phpt" role="test" />
- <file name="bug_4025.csv" role="test" />
- <file name="bug_4025.phpt" role="test" />
- <file name="bug_6311.csv" role="test" />
- <file name="bug_6311.phpt" role="test" />
- <file name="bug_6370.csv" role="test" />
- <file name="bug_6370.phpt" role="test" />
- <file name="bug_6372.csv" role="test" />
- <file name="bug_6372.phpt" role="test" />
- <file name="columns.phpt" role="test" />
- <file name="columns1.csv" role="test" />
- <file name="columns2.csv" role="test" />
- <file name="common.php" role="test" />
- <file name="linebreak.phpt" role="test" />
- <file name="multiline.phpt" role="test" />
- <file name="multiline1.csv" role="test" />
- <file name="notrailing_crlf.csv" role="test" />
- <file name="notrailing_lf.csv" role="test" />
- <file name="quote1.csv" role="test" />
- <file name="quote2.csv" role="test" />
- <file name="quote3.csv" role="test" />
- <file name="quote4.csv" role="test" />
- <file name="quote5.csv" role="test" />
- <file name="quotes.phpt" role="test" />
- <file name="simple_cr.csv" role="test" />
- <file name="simple_crlf.csv" role="test" />
- <file name="simple_lf.csv" role="test" />
- </dir> <!-- /test/Horde/Csv -->
- </dir> <!-- /test/Horde -->
- </dir> <!-- /test -->
- </dir> <!-- / -->
- </contents>
- <dependencies>
- <required>
- <php>
- <min>5.2.0</min>
- </php>
- <pearinstaller>
- <min>1.5.0</min>
- </pearinstaller>
- <package>
- <name>PEAR</name>
- <channel>pear.php.net</channel>
- </package>
- <package>
- <name>Translation</name>
- <channel>pear.horde.org</channel>
- </package>
- <extension>
- <name>pcre</name>
- </extension>
- </required>
- </dependencies>
- <phprelease>
- <filelist>
- <install as="Horde/File/Csv.php" name="lib/Horde/File/Csv.php" />
- <install as="Horde/File/Csv/Exception.php" name="lib/Horde/File/Csv/Exception.php" />
- <install as="Horde/File/Csv/Translation.php" name="lib/Horde/File/Csv/Translation.php" />
- <install as="locale/Horde_File_Csv.pot" name="locale/Horde_File_Csv.pot" />
- <install as="locale/ar/LC_MESSAGES/Horde_File_Csv.mo" name="locale/ar/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/ar/LC_MESSAGES/Horde_File_Csv.po" name="locale/ar/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/bg/LC_MESSAGES/Horde_File_Csv.mo" name="locale/bg/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/bg/LC_MESSAGES/Horde_File_Csv.po" name="locale/bg/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/bs/LC_MESSAGES/Horde_File_Csv.mo" name="locale/bs/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/bs/LC_MESSAGES/Horde_File_Csv.po" name="locale/bs/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/ca/LC_MESSAGES/Horde_File_Csv.mo" name="locale/ca/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/ca/LC_MESSAGES/Horde_File_Csv.po" name="locale/ca/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/cs/LC_MESSAGES/Horde_File_Csv.mo" name="locale/cs/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/cs/LC_MESSAGES/Horde_File_Csv.po" name="locale/cs/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/da/LC_MESSAGES/Horde_File_Csv.mo" name="locale/da/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/da/LC_MESSAGES/Horde_File_Csv.po" name="locale/da/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/de/LC_MESSAGES/Horde_File_Csv.mo" name="locale/de/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/de/LC_MESSAGES/Horde_File_Csv.po" name="locale/de/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/el/LC_MESSAGES/Horde_File_Csv.mo" name="locale/el/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/el/LC_MESSAGES/Horde_File_Csv.po" name="locale/el/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/en/LC_MESSAGES/Horde_File_Csv.mo" name="locale/en/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/en/LC_MESSAGES/Horde_File_Csv.po" name="locale/en/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/es/LC_MESSAGES/Horde_File_Csv.mo" name="locale/es/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/es/LC_MESSAGES/Horde_File_Csv.po" name="locale/es/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/et/LC_MESSAGES/Horde_File_Csv.mo" name="locale/et/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/et/LC_MESSAGES/Horde_File_Csv.po" name="locale/et/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/eu/LC_MESSAGES/Horde_File_Csv.mo" name="locale/eu/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/eu/LC_MESSAGES/Horde_File_Csv.po" name="locale/eu/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/fa/LC_MESSAGES/Horde_File_Csv.mo" name="locale/fa/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/fa/LC_MESSAGES/Horde_File_Csv.po" name="locale/fa/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/fi/LC_MESSAGES/Horde_File_Csv.mo" name="locale/fi/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/fi/LC_MESSAGES/Horde_File_Csv.po" name="locale/fi/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/fr/LC_MESSAGES/Horde_File_Csv.mo" name="locale/fr/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/fr/LC_MESSAGES/Horde_File_Csv.po" name="locale/fr/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/gl/LC_MESSAGES/Horde_File_Csv.mo" name="locale/gl/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/gl/LC_MESSAGES/Horde_File_Csv.po" name="locale/gl/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/he/LC_MESSAGES/Horde_File_Csv.mo" name="locale/he/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/he/LC_MESSAGES/Horde_File_Csv.po" name="locale/he/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/hr/LC_MESSAGES/Horde_File_Csv.mo" name="locale/hr/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/hr/LC_MESSAGES/Horde_File_Csv.po" name="locale/hr/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/hu/LC_MESSAGES/Horde_File_Csv.mo" name="locale/hu/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/hu/LC_MESSAGES/Horde_File_Csv.po" name="locale/hu/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/id/LC_MESSAGES/Horde_File_Csv.mo" name="locale/id/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/id/LC_MESSAGES/Horde_File_Csv.po" name="locale/id/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/is/LC_MESSAGES/Horde_File_Csv.mo" name="locale/is/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/is/LC_MESSAGES/Horde_File_Csv.po" name="locale/is/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/it/LC_MESSAGES/Horde_File_Csv.mo" name="locale/it/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/it/LC_MESSAGES/Horde_File_Csv.po" name="locale/it/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/ja/LC_MESSAGES/Horde_File_Csv.mo" name="locale/ja/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/ja/LC_MESSAGES/Horde_File_Csv.po" name="locale/ja/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/km/LC_MESSAGES/Horde_File_Csv.mo" name="locale/km/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/km/LC_MESSAGES/Horde_File_Csv.po" name="locale/km/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/ko/LC_MESSAGES/Horde_File_Csv.mo" name="locale/ko/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/ko/LC_MESSAGES/Horde_File_Csv.po" name="locale/ko/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/lt/LC_MESSAGES/Horde_File_Csv.mo" name="locale/lt/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/lt/LC_MESSAGES/Horde_File_Csv.po" name="locale/lt/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/lv/LC_MESSAGES/Horde_File_Csv.mo" name="locale/lv/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/lv/LC_MESSAGES/Horde_File_Csv.po" name="locale/lv/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/mk/LC_MESSAGES/Horde_File_Csv.mo" name="locale/mk/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/mk/LC_MESSAGES/Horde_File_Csv.po" name="locale/mk/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/nb/LC_MESSAGES/Horde_File_Csv.mo" name="locale/nb/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/nb/LC_MESSAGES/Horde_File_Csv.po" name="locale/nb/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/nl/LC_MESSAGES/Horde_File_Csv.mo" name="locale/nl/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/nl/LC_MESSAGES/Horde_File_Csv.po" name="locale/nl/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/nn/LC_MESSAGES/Horde_File_Csv.mo" name="locale/nn/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/nn/LC_MESSAGES/Horde_File_Csv.po" name="locale/nn/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/pl/LC_MESSAGES/Horde_File_Csv.mo" name="locale/pl/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/pl/LC_MESSAGES/Horde_File_Csv.po" name="locale/pl/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/pt/LC_MESSAGES/Horde_File_Csv.mo" name="locale/pt/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/pt/LC_MESSAGES/Horde_File_Csv.po" name="locale/pt/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/pt_BR/LC_MESSAGES/Horde_File_Csv.mo" name="locale/pt_BR/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/pt_BR/LC_MESSAGES/Horde_File_Csv.po" name="locale/pt_BR/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/ro/LC_MESSAGES/Horde_File_Csv.mo" name="locale/ro/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/ro/LC_MESSAGES/Horde_File_Csv.po" name="locale/ro/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/ru/LC_MESSAGES/Horde_File_Csv.mo" name="locale/ru/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/ru/LC_MESSAGES/Horde_File_Csv.po" name="locale/ru/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/sk/LC_MESSAGES/Horde_File_Csv.mo" name="locale/sk/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/sk/LC_MESSAGES/Horde_File_Csv.po" name="locale/sk/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/sl/LC_MESSAGES/Horde_File_Csv.mo" name="locale/sl/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/sl/LC_MESSAGES/Horde_File_Csv.po" name="locale/sl/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/sv/LC_MESSAGES/Horde_File_Csv.mo" name="locale/sv/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/sv/LC_MESSAGES/Horde_File_Csv.po" name="locale/sv/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/tr/LC_MESSAGES/Horde_File_Csv.mo" name="locale/tr/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/tr/LC_MESSAGES/Horde_File_Csv.po" name="locale/tr/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/uk/LC_MESSAGES/Horde_File_Csv.mo" name="locale/uk/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/uk/LC_MESSAGES/Horde_File_Csv.po" name="locale/uk/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/zh_CN/LC_MESSAGES/Horde_File_Csv.mo" name="locale/zh_CN/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/zh_CN/LC_MESSAGES/Horde_File_Csv.po" name="locale/zh_CN/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="locale/zh_TW/LC_MESSAGES/Horde_File_Csv.mo" name="locale/zh_TW/LC_MESSAGES/Horde_File_Csv.mo" />
- <install as="locale/zh_TW/LC_MESSAGES/Horde_File_Csv.po" name="locale/zh_TW/LC_MESSAGES/Horde_File_Csv.po" />
- <install as="Horde/Csv/001.csv" name="test/Horde/Csv/001.csv" />
- <install as="Horde/Csv/001.phpt" name="test/Horde/Csv/001.phpt" />
- <install as="Horde/Csv/002.csv" name="test/Horde/Csv/002.csv" />
- <install as="Horde/Csv/002.phpt" name="test/Horde/Csv/002.phpt" />
- <install as="Horde/Csv/003.csv" name="test/Horde/Csv/003.csv" />
- <install as="Horde/Csv/003.phpt" name="test/Horde/Csv/003.phpt" />
- <install as="Horde/Csv/004.csv" name="test/Horde/Csv/004.csv" />
- <install as="Horde/Csv/004.phpt" name="test/Horde/Csv/004.phpt" />
- <install as="Horde/Csv/005.csv" name="test/Horde/Csv/005.csv" />
- <install as="Horde/Csv/005.phpt" name="test/Horde/Csv/005.phpt" />
- <install as="Horde/Csv/bug_3839.csv" name="test/Horde/Csv/bug_3839.csv" />
- <install as="Horde/Csv/bug_3839.phpt" name="test/Horde/Csv/bug_3839.phpt" />
- <install as="Horde/Csv/bug_4025.csv" name="test/Horde/Csv/bug_4025.csv" />
- <install as="Horde/Csv/bug_4025.phpt" name="test/Horde/Csv/bug_4025.phpt" />
- <install as="Horde/Csv/bug_6311.csv" name="test/Horde/Csv/bug_6311.csv" />
- <install as="Horde/Csv/bug_6311.phpt" name="test/Horde/Csv/bug_6311.phpt" />
- <install as="Horde/Csv/bug_6370.csv" name="test/Horde/Csv/bug_6370.csv" />
- <install as="Horde/Csv/bug_6370.phpt" name="test/Horde/Csv/bug_6370.phpt" />
- <install as="Horde/Csv/bug_6372.csv" name="test/Horde/Csv/bug_6372.csv" />
- <install as="Horde/Csv/bug_6372.phpt" name="test/Horde/Csv/bug_6372.phpt" />
- <install as="Horde/Csv/columns.phpt" name="test/Horde/Csv/columns.phpt" />
- <install as="Horde/Csv/columns1.csv" name="test/Horde/Csv/columns1.csv" />
- <install as="Horde/Csv/columns2.csv" name="test/Horde/Csv/columns2.csv" />
- <install as="Horde/Csv/common.php" name="test/Horde/Csv/common.php" />
- <install as="Horde/Csv/linebreak.phpt" name="test/Horde/Csv/linebreak.phpt" />
- <install as="Horde/Csv/multiline.phpt" name="test/Horde/Csv/multiline.phpt" />
- <install as="Horde/Csv/multiline1.csv" name="test/Horde/Csv/multiline1.csv" />
- <install as="Horde/Csv/notrailing_crlf.csv" name="test/Horde/Csv/notrailing_crlf.csv" />
- <install as="Horde/Csv/notrailing_lf.csv" name="test/Horde/Csv/notrailing_lf.csv" />
- <install as="Horde/Csv/quote1.csv" name="test/Horde/Csv/quote1.csv" />
- <install as="Horde/Csv/quote2.csv" name="test/Horde/Csv/quote2.csv" />
- <install as="Horde/Csv/quote3.csv" name="test/Horde/Csv/quote3.csv" />
- <install as="Horde/Csv/quote4.csv" name="test/Horde/Csv/quote4.csv" />
- <install as="Horde/Csv/quote5.csv" name="test/Horde/Csv/quote5.csv" />
- <install as="Horde/Csv/quotes.phpt" name="test/Horde/Csv/quotes.phpt" />
- <install as="Horde/Csv/simple_cr.csv" name="test/Horde/Csv/simple_cr.csv" />
- <install as="Horde/Csv/simple_crlf.csv" name="test/Horde/Csv/simple_crlf.csv" />
- <install as="Horde/Csv/simple_lf.csv" name="test/Horde/Csv/simple_lf.csv" />
- </filelist>
- </phprelease>
- <changelog>
- <release>
- <version>
- <release>0.1.0</release>
- <api>0.1.0</api>
- </version>
- <stability>
- <release>beta</release>
- <api>beta</api>
- </stability>
- <date>2004-01-01</date>
- <license uri="http://www.php.net/license">PHP</license>
- <notes>
-First release.
- </notes>
- </release>
- <release>
- <date>2006-05-08</date>
- <time>21:32:31</time>
- <version>
- <release>0.1.1</release>
- <api>0.1.1</api>
- </version>
- <stability>
- <release>beta</release>
- <api>beta</api>
- </stability>
- <license uri="http://www.php.net/license">PHP</license>
- <notes>
-* Converted to package.xml 2.0 for pear.horde.org
-* Close Horde bug #6372 (ritaselsky@gmail.com)
- </notes>
- </release>
- <release>
- <version>
- <release>0.2.0</release>
- <api>0.2.0</api>
- </version>
- <stability>
- <release>beta</release>
- <api>beta</api>
- </stability>
- <date>2010-10-22</date>
- <license uri="http://www.php.net/license">PHP</license>
- <notes>
-* Initial Horde 4 Package
- </notes>
- </release>
- </changelog>
-</package>
+++ /dev/null
-"Field 1-1", "Field 1-2", "Field 1-3", "Field 1-4"
-"Field 2-1", "Field 2-2", "Field 2-3"
-"Field 3-1", "Field 3-2"
-"Field 4-1"
+++ /dev/null
---TEST--
-Horde_File_Csv Test Case 001: Fields count less than expected
---FILE--
-<?php
-/**
- * Test for:
- * - Horde_File_Csv::discoverFormat()
- * - Horde_File_Csv::readQuoted()
- */
-
-require_once dirname(__FILE__) . '/../../../lib/Horde/Csv.php';
-
-$file = dirname(__FILE__) . '/001.csv';
-$conf = Horde_File_Csv::discoverFormat($file);
-$conf['fields'] = 4;
-
-var_dump($conf);
-
-$data = array();
-while ($res = Horde_File_Csv::readQuoted($file, $conf)) {
- $data[] = $res;
-}
-
-var_dump($data);
-
-?>
---EXPECT--
-array(4) {
- ["crlf"]=>
- string(1) "
-"
- ["fields"]=>
- int(4)
- ["sep"]=>
- string(1) ","
- ["quote"]=>
- string(1) """
-}
-array(4) {
- [0]=>
- array(4) {
- [0]=>
- string(9) "Field 1-1"
- [1]=>
- string(9) "Field 1-2"
- [2]=>
- string(9) "Field 1-3"
- [3]=>
- string(9) "Field 1-4"
- }
- [1]=>
- array(4) {
- [0]=>
- string(9) "Field 2-1"
- [1]=>
- string(9) "Field 2-2"
- [2]=>
- string(9) "Field 2-3"
- [3]=>
- string(0) ""
- }
- [2]=>
- array(4) {
- [0]=>
- string(9) "Field 3-1"
- [1]=>
- string(9) "Field 3-2"
- [2]=>
- string(0) ""
- [3]=>
- string(0) ""
- }
- [3]=>
- array(4) {
- [0]=>
- string(9) "Field 4-1"
- [1]=>
- string(0) ""
- [2]=>
- string(0) ""
- [3]=>
- string(0) ""
- }
-}
+++ /dev/null
-"Field 1-1", "Field 1-2", "Field 1-3", "Field 1-4"
-"Field 2-1", "Field 2-2", "Field 2-3", "Field 2-4", "Extra Field"
-"Field 3-1", "Field 3-2"
-"Field 4-1"
+++ /dev/null
---TEST--
-Horde_File_Csv Test Case 002: Fields count more than expected
---FILE--
-<?php
-/**
- * Test for:
- * - Horde_File_Csv::discoverFormat()
- * - Horde_File_Csv::readQuoted()
- */
-
-require_once dirname(__FILE__) . '/../../../lib/Horde/Csv.php';
-
-$file = dirname(__FILE__) . '/002.csv';
-$conf = Horde_File_Csv::discoverFormat($file);
-$conf['fields'] = 4;
-
-var_dump($conf);
-
-$data = array();
-while ($res = Horde_File_Csv::readQuoted($file, $conf)) {
- $data[] = $res;
-}
-
-var_dump($data);
-
-?>
---EXPECT--
-array(4) {
- ["crlf"]=>
- string(1) "
-"
- ["fields"]=>
- int(4)
- ["sep"]=>
- string(1) ","
- ["quote"]=>
- string(1) """
-}
-array(4) {
- [0]=>
- array(4) {
- [0]=>
- string(9) "Field 1-1"
- [1]=>
- string(9) "Field 1-2"
- [2]=>
- string(9) "Field 1-3"
- [3]=>
- string(9) "Field 1-4"
- }
- [1]=>
- array(4) {
- [0]=>
- string(9) "Field 2-1"
- [1]=>
- string(9) "Field 2-2"
- [2]=>
- string(9) "Field 2-3"
- [3]=>
- string(9) "Field 2-4"
- }
- [2]=>
- array(4) {
- [0]=>
- string(9) "Field 3-1"
- [1]=>
- string(9) "Field 3-2"
- [2]=>
- string(0) ""
- [3]=>
- string(0) ""
- }
- [3]=>
- array(4) {
- [0]=>
- string(9) "Field 4-1"
- [1]=>
- string(0) ""
- [2]=>
- string(0) ""
- [3]=>
- string(0) ""
- }
-}
+++ /dev/null
-"Field 1-1","Field 1-2","Field 1-3","Field 1-4"
-"Field 2-1","Field 2-2","Field 2-3","I'm multiline
-Field"
-"Field 3-1","Field 3-2","Field 3-3"
+++ /dev/null
---TEST--
-Horde_File_Csv Test Case 003: Windows EOL
---FILE--
-<?php
-/**
- * Test for:
- * - Horde_File_Csv::discoverFormat()
- * - Horde_File_Csv::readQuoted()
- */
-
-require_once dirname(__FILE__) . '/../CSV.php';
-
-$file = dirname(__FILE__) . '/003.csv';
-$conf = Horde_File_Csv::discoverFormat($file);
-
-print "Format:\n";
-print_r($conf);
-print "\n";
-
-$data = array();
-while ($res = Horde_File_Csv::readQuoted($file, $conf)) {
- $data[] = $res;
-}
-
-print "Data:\n";
-print_r($data);
-?>
---EXPECT--
-Format:
-Array
-(
- [crlf] =>
-
- [fields] => 4
- [sep] => ,
- [quote] => "
-)
-
-Data:
-Array
-(
- [0] => Array
- (
- [0] => Field 1-1
- [1] => Field 1-2
- [2] => Field 1-3
- [3] => Field 1-4
- )
-
- [1] => Array
- (
- [0] => Field 2-1
- [1] => Field 2-2
- [2] => Field 2-3
- [3] => I'm multiline
-Field
- )
-
- [2] => Array
- (
- [0] => Field 3-1
- [1] => Field 3-2
- [2] => Field 3-3
- [3] =>
- )
-
-)
+++ /dev/null
-"Field 1-1","Field 1-2","Field 1-3","Field 1-4"
-"Field 2-1","Field 2-2","Field 2-3","I'm multiline
-Field"
-"Field 3-1","Field 3-2","Field 3-3"
+++ /dev/null
---TEST--
-Horde_File_Csv Test Case 004: Unix EOL
---FILE--
-<?php
-/**
- * Test for:
- * - Horde_File_Csv::discoverFormat()
- * - Horde_File_Csv::readQuoted()
- */
-
-require_once dirname(__FILE__) . '/../../../lib/Horde/Csv.php';
-
-$file = dirname(__FILE__) . '/004.csv';
-$conf = Horde_File_Csv::discoverFormat($file);
-
-print "Format:\n";
-print_r($conf);
-print "\n";
-
-$data = array();
-while ($res = Horde_File_Csv::readQuoted($file, $conf)) {
- $data[] = $res;
-}
-
-print "Data:\n";
-print_r($data);
-?>
---EXPECT--
-Format:
-Array
-(
- [crlf] =>
-
- [fields] => 4
- [sep] => ,
- [quote] => "
-)
-
-Data:
-Array
-(
- [0] => Array
- (
- [0] => Field 1-1
- [1] => Field 1-2
- [2] => Field 1-3
- [3] => Field 1-4
- )
-
- [1] => Array
- (
- [0] => Field 2-1
- [1] => Field 2-2
- [2] => Field 2-3
- [3] => I'm multiline
-Field
- )
-
- [2] => Array
- (
- [0] => Field 3-1
- [1] => Field 3-2
- [2] => Field 3-3
- [3] =>
- )
-
-)
+++ /dev/null
-"Field 1-1","Field 1-2","Field 1-3","Field 1-4"\r"Field 2-1","Field 2-2","Field 2-3","I'm multiline\rField"\r"Field 3-1","Field 3-2","Field 3-3"\r
\ No newline at end of file
+++ /dev/null
---TEST--
-Horde_File_Csv Test Case 005: Mac EOL
---FILE--
-<?php
-/**
- * Test for:
- * - Horde_File_Csv::discoverFormat()
- * - Horde_File_Csv::readQuoted()
- */
-
-require_once dirname(__FILE__) . '/../../../lib/Horde/Csv.php';
-
-$file = dirname(__FILE__) . '/005.csv';
-$conf = Horde_File_Csv::discoverFormat($file);
-//$conf['fields'] = 4;
-
-print "Format:\n";
-print_r($conf);
-print "\n";
-
-$data = array();
-while ($res = Horde_File_Csv::readQuoted($file, $conf)) {
- $data[] = $res;
-}
-
-print "Data:\n";
-print_r($data);
-?>
---EXPECT--
-Format:
-Array
-(
- [crlf] =>
- [fields] => 4
- [sep] => ,
- [quote] => "
-)
-
-Data:
-Array
-(
- [0] => Array
- (
- [0] => Field 1-1
- [1] => Field 1-2
- [2] => Field 1-3
- [3] => Field 1-4
- )
-
- [1] => Array
- (
- [0] => Field 2-1
- [1] => Field 2-2
- [2] => Field 2-3
- [3] => I'm multiline
-Field
- )
-
- [2] => Array
- (
- [0] => Field 3-1
- [1] => Field 3-2
- [2] => Field 3-3
- [3] =>
- )
-
-)
+++ /dev/null
-Subject~Start Date~Start Time~End Date~End Time~All day event~Reminder on/off~Reminder Date~Reminder Time~Category~Description~Priority
-"Inservice on new resource: ""CPNP Toolkit"""~2004-11-08~10:30 AM~2004-11-08~11:30 AM~FALSE~FALSE~~~Training~"CPN Program ...
-Inservice on new resource: ""CPNP Toolkit""
-
-<b>Registration Deadline: October 27, 2004, noon</b>
-
-<a href=""F041108A-Eval.pdf"" target=""_blank"">
-<img src=""acrobat.gif"" border=""0""></a> <a href=""F041108A-Eval.pdf"" target=""_blank""> Session Evaluation - Eligibility for Prize!</a>
-
-<a href=""F041108A-DI.pdf"" target=""_blank"">
-<img src=""acrobat.gif"" border=""0""></a> <a href=""F041108A-DI.pdf"" target=""_blank""> Dial In Numbers for Sites Registered</a>
-
-<a href=""F041108A.pdf"" target=""_blank"">
-<img src=""acrobat.gif"" border=""0""></a> <a href=""F041108A.pdf"" target=""_blank""> Poster and Registration Form</a>
-
-Facilitator: Manager
-
-preblurb preblurb preblurb preblurb preblurb preblurb preblurb preblurb preblurb ""CPNP Toolkit"". postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb .
-
-postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb
-
-Come check out the new resource!"~Normal
+++ /dev/null
---TEST--
-Horde_File_Csv: test for Bug #3839
---FILE--
-<?php
-
-require_once dirname(__FILE__) . '/../../../lib/Horde/Csv.php';
-
-$file = dirname(__FILE__) . '/bug_3839.csv';
-
-// Explicit conf since we can't detect these settings. Might be able
-// to improve auto-detection, but it definitely should work with the
-// settings specified explicitly.
-// var_dump(Horde_File_Csv::discoverFormat($file));
-$conf['crlf'] = "\r\n";
-$conf['sep'] = '~';
-$conf['fields'] = 12;
-$conf['quote'] = '"';
-
-$csv = array();
-while ($row = Horde_File_Csv::read($file, $conf)) {
- if (is_a($row, 'PEAR_Error')) {
- var_dump($row);
- return;
- }
- $csv[] = $row;
-}
-var_dump($csv);
-$warnings = Horde_File_Csv::warning();
-if (count($warnings)) {
- var_dump($warnings);
-}
-
-?>
---EXPECT--
-array(2) {
- [0]=>
- array(12) {
- [0]=>
- string(7) "Subject"
- [1]=>
- string(10) "Start Date"
- [2]=>
- string(10) "Start Time"
- [3]=>
- string(8) "End Date"
- [4]=>
- string(8) "End Time"
- [5]=>
- string(13) "All day event"
- [6]=>
- string(15) "Reminder on/off"
- [7]=>
- string(13) "Reminder Date"
- [8]=>
- string(13) "Reminder Time"
- [9]=>
- string(8) "Category"
- [10]=>
- string(11) "Description"
- [11]=>
- string(8) "Priority"
- }
- [1]=>
- array(12) {
- [0]=>
- string(41) "Inservice on new resource: "CPNP Toolkit""
- [1]=>
- string(10) "2004-11-08"
- [2]=>
- string(8) "10:30 AM"
- [3]=>
- string(10) "2004-11-08"
- [4]=>
- string(8) "11:30 AM"
- [5]=>
- string(5) "FALSE"
- [6]=>
- string(5) "FALSE"
- [7]=>
- string(0) ""
- [8]=>
- string(0) ""
- [9]=>
- string(8) "Training"
- [10]=>
- string(1109) "CPN Program ...
-Inservice on new resource: "CPNP Toolkit"
-
-<b>Registration Deadline: October 27, 2004, noon</b>
-
-<a href="F041108A-Eval.pdf" target="_blank">
-<img src="acrobat.gif" border="0"></a> <a href="F041108A-Eval.pdf" target="_blank"> Session Evaluation - Eligibility for Prize!</a>
-
-<a href="F041108A-DI.pdf" target="_blank">
-<img src="acrobat.gif" border="0"></a> <a href="F041108A-DI.pdf" target="_blank"> Dial In Numbers for Sites Registered</a>
-
-<a href="F041108A.pdf" target="_blank">
-<img src="acrobat.gif" border="0"></a> <a href="F041108A.pdf" target="_blank"> Poster and Registration Form</a>
-
-Facilitator: Manager
-
-preblurb preblurb preblurb preblurb preblurb preblurb preblurb preblurb preblurb "CPNP Toolkit". postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb .
-
-postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb
-
-Come check out the new resource!"
- [11]=>
- string(6) "Normal"
- }
-}
+++ /dev/null
-"Betreff","Beginnt am","Beginnt um","Endet am","Endet um","Ganztägiges Ereignis","Erinnerung Ein/Aus","Erinnerung am","Erinnerung um","Besprechungsplanung","Erforderliche Teilnehmer","Optionale Teilnehmer","Besprechungsressourcen","Abrechnungsinformationen","Beschreibung","Kategorien","Ort","Priorität","Privat","Reisekilometer","Vertraulichkeit","Zeitspanne zeigen als"
-"Burger Download Session","2.5.2006","11:50:00","2.5.2006","13:00:00","Aus","Ein","2.5.2006","11:35:00","Haas, Jörg","Kuhl, Oliver",,,,"
-",,"Burger Upload Station (Burger King)","Normal","Aus",,"Normal","1"
+++ /dev/null
---TEST--
-Horde_File_Csv: test for Bug #4025
---FILE--
-<?php
-
-require_once dirname(__FILE__) . '/../../../lib/Horde/Csv.php';
-
-$file = dirname(__FILE__) . '/bug_4025.csv';
-
-// Explicit conf since we can't detect these settings. Might be able
-// to improve auto-detection, but it definitely should work with the
-// settings specified explicitly.
-// var_dump(Horde_File_Csv::discoverFormat($file));
-$conf['crlf'] = "\r\n";
-$conf['sep'] = ',';
-$conf['fields'] = 22;
-$conf['quote'] = '"';
-
-$csv = array();
-while ($row = Horde_File_Csv::read($file, $conf)) {
- if (is_a($row, 'PEAR_Error')) {
- var_dump($row);
- return;
- }
- $csv[] = $row;
-}
-var_dump($csv);
-$warnings = Horde_File_Csv::warning();
-if (count($warnings)) {
- var_dump($warnings);
-}
-
-?>
---EXPECT--
-array(2) {
- [0]=>
- array(22) {
- [0]=>
- string(7) "Betreff"
- [1]=>
- string(10) "Beginnt am"
- [2]=>
- string(10) "Beginnt um"
- [3]=>
- string(8) "Endet am"
- [4]=>
- string(8) "Endet um"
- [5]=>
- string(20) "Ganztägiges Ereignis"
- [6]=>
- string(18) "Erinnerung Ein/Aus"
- [7]=>
- string(13) "Erinnerung am"
- [8]=>
- string(13) "Erinnerung um"
- [9]=>
- string(19) "Besprechungsplanung"
- [10]=>
- string(24) "Erforderliche Teilnehmer"
- [11]=>
- string(20) "Optionale Teilnehmer"
- [12]=>
- string(22) "Besprechungsressourcen"
- [13]=>
- string(24) "Abrechnungsinformationen"
- [14]=>
- string(12) "Beschreibung"
- [15]=>
- string(10) "Kategorien"
- [16]=>
- string(3) "Ort"
- [17]=>
- string(9) "Priorität"
- [18]=>
- string(6) "Privat"
- [19]=>
- string(14) "Reisekilometer"
- [20]=>
- string(15) "Vertraulichkeit"
- [21]=>
- string(21) "Zeitspanne zeigen als"
- }
- [1]=>
- array(22) {
- [0]=>
- string(23) "Burger Download Session"
- [1]=>
- string(8) "2.5.2006"
- [2]=>
- string(8) "11:50:00"
- [3]=>
- string(8) "2.5.2006"
- [4]=>
- string(8) "13:00:00"
- [5]=>
- string(3) "Aus"
- [6]=>
- string(3) "Ein"
- [7]=>
- string(8) "2.5.2006"
- [8]=>
- string(8) "11:35:00"
- [9]=>
- string(10) "Haas, Jörg"
- [10]=>
- string(12) "Kuhl, Oliver"
- [11]=>
- string(0) ""
- [12]=>
- string(0) ""
- [13]=>
- string(0) ""
- [14]=>
- string(1) "
-"
- [15]=>
- string(0) ""
- [16]=>
- string(35) "Burger Upload Station (Burger King)"
- [17]=>
- string(6) "Normal"
- [18]=>
- string(3) "Aus"
- [19]=>
- string(0) ""
- [20]=>
- string(6) "Normal"
- [21]=>
- string(1) "1"
- }
-}
+++ /dev/null
-"Title","First Name","Middle Name","Last Name","Suffix","Company","Department","Job Title","Business Street","Business Street 2","Business Street 3","Business City","Business State","Business Postal Code","Business Country/Region","Home Street","Home Street 2","Home Street 3","Home City","Home State","Home Postal Code","Home Country/Region","Other Street","Other Street 2","Other Street 3","Other City","Other State","Other Postal Code","Other Country/Region","Assistant's Phone","Business Fax","Business Phone","Business Phone 2","Callback","Car Phone","Company Main Phone","Home Fax","Home Phone","Home Phone 2","ISDN","Mobile Phone","Other Fax","Other Phone","Pager","Primary Phone","Radio Phone","TTY/TDD Phone","Telex","Account","Anniversary","Assistant's Name","Billing Information","Birthday","Business Address PO Box","Categories","Children","Directory Server","E-mail Address","E-mail Type","E-mail Display Name","E-mail 2 Address","E-mail 2 Type","E-mail 2 Display Name","E-mail 3 Address","E-mail 3 Type","E-mail 3 Display Name","Gender","Government ID Number","Hobby","Home Address PO Box","Initials","Internet Free Busy","Keywords","Language","Location","Manager's Name","Mileage","Notes","Office Location","Organizational ID Number","Other Address PO Box","Priority","Private","Profession","Referred By","Sensitivity","Spouse","User 1","User 2","User 3","User 4","Web Page"
-"","John","","Smith","","International Inc","","","",,,"","","","","",,,"","","","","",,,"","","","","","(123) 555-1111","(123) 555-2222","","","","","","","","","(123) 555-3333","","","","","","","","","0/0/00","",,"0/0/00",,"Programming",,,"john@example.com","SMTP","John Smith (john@example.com)",,,,,,,"Unspecified","",,,"J.S.","","","","","",,"PHP
-Perl
-Python
-","","",,"Normal","False","",,"Normal","","","","","",""
+++ /dev/null
---TEST--
-Horde_File_Csv: test for Bug #6311
---FILE--
-<?php
-
-require_once dirname(__FILE__) . '/../../../lib/Horde/Csv.php';
-
-$file = dirname(__FILE__) . '/bug_6311.csv';
-
-// Explicit conf since we can't detect these settings. Might be able
-// to improve auto-detection, but it definitely should work with the
-// settings specified explicitly.
-// var_dump(Horde_File_Csv::discoverFormat($file));
-$conf['crlf'] = "\n";
-$conf['sep'] = ',';
-$conf['fields'] = 92;
-$conf['quote'] = '"';
-
-$csv = array();
-while ($row = Horde_File_Csv::read($file, $conf)) {
- if (is_a($row, 'PEAR_Error')) {
- var_dump($row);
- exit;
- }
- $csv[] = $row;
-}
-var_dump($csv);
-$warnings = Horde_File_Csv::warning();
-if (count($warnings)) {
- var_dump($warnings);
-}
-
-?>
---EXPECT--
-array(2) {
- [0]=>
- array(92) {
- [0]=>
- string(5) "Title"
- [1]=>
- string(10) "First Name"
- [2]=>
- string(11) "Middle Name"
- [3]=>
- string(9) "Last Name"
- [4]=>
- string(6) "Suffix"
- [5]=>
- string(7) "Company"
- [6]=>
- string(10) "Department"
- [7]=>
- string(9) "Job Title"
- [8]=>
- string(15) "Business Street"
- [9]=>
- string(17) "Business Street 2"
- [10]=>
- string(17) "Business Street 3"
- [11]=>
- string(13) "Business City"
- [12]=>
- string(14) "Business State"
- [13]=>
- string(20) "Business Postal Code"
- [14]=>
- string(23) "Business Country/Region"
- [15]=>
- string(11) "Home Street"
- [16]=>
- string(13) "Home Street 2"
- [17]=>
- string(13) "Home Street 3"
- [18]=>
- string(9) "Home City"
- [19]=>
- string(10) "Home State"
- [20]=>
- string(16) "Home Postal Code"
- [21]=>
- string(19) "Home Country/Region"
- [22]=>
- string(12) "Other Street"
- [23]=>
- string(14) "Other Street 2"
- [24]=>
- string(14) "Other Street 3"
- [25]=>
- string(10) "Other City"
- [26]=>
- string(11) "Other State"
- [27]=>
- string(17) "Other Postal Code"
- [28]=>
- string(20) "Other Country/Region"
- [29]=>
- string(17) "Assistant's Phone"
- [30]=>
- string(12) "Business Fax"
- [31]=>
- string(14) "Business Phone"
- [32]=>
- string(16) "Business Phone 2"
- [33]=>
- string(8) "Callback"
- [34]=>
- string(9) "Car Phone"
- [35]=>
- string(18) "Company Main Phone"
- [36]=>
- string(8) "Home Fax"
- [37]=>
- string(10) "Home Phone"
- [38]=>
- string(12) "Home Phone 2"
- [39]=>
- string(4) "ISDN"
- [40]=>
- string(12) "Mobile Phone"
- [41]=>
- string(9) "Other Fax"
- [42]=>
- string(11) "Other Phone"
- [43]=>
- string(5) "Pager"
- [44]=>
- string(13) "Primary Phone"
- [45]=>
- string(11) "Radio Phone"
- [46]=>
- string(13) "TTY/TDD Phone"
- [47]=>
- string(5) "Telex"
- [48]=>
- string(7) "Account"
- [49]=>
- string(11) "Anniversary"
- [50]=>
- string(16) "Assistant's Name"
- [51]=>
- string(19) "Billing Information"
- [52]=>
- string(8) "Birthday"
- [53]=>
- string(23) "Business Address PO Box"
- [54]=>
- string(10) "Categories"
- [55]=>
- string(8) "Children"
- [56]=>
- string(16) "Directory Server"
- [57]=>
- string(14) "E-mail Address"
- [58]=>
- string(11) "E-mail Type"
- [59]=>
- string(19) "E-mail Display Name"
- [60]=>
- string(16) "E-mail 2 Address"
- [61]=>
- string(13) "E-mail 2 Type"
- [62]=>
- string(21) "E-mail 2 Display Name"
- [63]=>
- string(16) "E-mail 3 Address"
- [64]=>
- string(13) "E-mail 3 Type"
- [65]=>
- string(21) "E-mail 3 Display Name"
- [66]=>
- string(6) "Gender"
- [67]=>
- string(20) "Government ID Number"
- [68]=>
- string(5) "Hobby"
- [69]=>
- string(19) "Home Address PO Box"
- [70]=>
- string(8) "Initials"
- [71]=>
- string(18) "Internet Free Busy"
- [72]=>
- string(8) "Keywords"
- [73]=>
- string(8) "Language"
- [74]=>
- string(8) "Location"
- [75]=>
- string(14) "Manager's Name"
- [76]=>
- string(7) "Mileage"
- [77]=>
- string(5) "Notes"
- [78]=>
- string(15) "Office Location"
- [79]=>
- string(24) "Organizational ID Number"
- [80]=>
- string(20) "Other Address PO Box"
- [81]=>
- string(8) "Priority"
- [82]=>
- string(7) "Private"
- [83]=>
- string(10) "Profession"
- [84]=>
- string(11) "Referred By"
- [85]=>
- string(11) "Sensitivity"
- [86]=>
- string(6) "Spouse"
- [87]=>
- string(6) "User 1"
- [88]=>
- string(6) "User 2"
- [89]=>
- string(6) "User 3"
- [90]=>
- string(6) "User 4"
- [91]=>
- string(8) "Web Page"
- }
- [1]=>
- array(92) {
- [0]=>
- string(0) ""
- [1]=>
- string(4) "John"
- [2]=>
- string(0) ""
- [3]=>
- string(5) "Smith"
- [4]=>
- string(0) ""
- [5]=>
- string(17) "International Inc"
- [6]=>
- string(0) ""
- [7]=>
- string(0) ""
- [8]=>
- string(0) ""
- [9]=>
- string(0) ""
- [10]=>
- string(0) ""
- [11]=>
- string(0) ""
- [12]=>
- string(0) ""
- [13]=>
- string(0) ""
- [14]=>
- string(0) ""
- [15]=>
- string(0) ""
- [16]=>
- string(0) ""
- [17]=>
- string(0) ""
- [18]=>
- string(0) ""
- [19]=>
- string(0) ""
- [20]=>
- string(0) ""
- [21]=>
- string(0) ""
- [22]=>
- string(0) ""
- [23]=>
- string(0) ""
- [24]=>
- string(0) ""
- [25]=>
- string(0) ""
- [26]=>
- string(0) ""
- [27]=>
- string(0) ""
- [28]=>
- string(0) ""
- [29]=>
- string(0) ""
- [30]=>
- string(14) "(123) 555-1111"
- [31]=>
- string(14) "(123) 555-2222"
- [32]=>
- string(0) ""
- [33]=>
- string(0) ""
- [34]=>
- string(0) ""
- [35]=>
- string(0) ""
- [36]=>
- string(0) ""
- [37]=>
- string(0) ""
- [38]=>
- string(0) ""
- [39]=>
- string(0) ""
- [40]=>
- string(14) "(123) 555-3333"
- [41]=>
- string(0) ""
- [42]=>
- string(0) ""
- [43]=>
- string(0) ""
- [44]=>
- string(0) ""
- [45]=>
- string(0) ""
- [46]=>
- string(0) ""
- [47]=>
- string(0) ""
- [48]=>
- string(0) ""
- [49]=>
- string(6) "0/0/00"
- [50]=>
- string(0) ""
- [51]=>
- string(0) ""
- [52]=>
- string(6) "0/0/00"
- [53]=>
- string(0) ""
- [54]=>
- string(11) "Programming"
- [55]=>
- string(0) ""
- [56]=>
- string(0) ""
- [57]=>
- string(16) "john@example.com"
- [58]=>
- string(4) "SMTP"
- [59]=>
- string(29) "John Smith (john@example.com)"
- [60]=>
- string(0) ""
- [61]=>
- string(0) ""
- [62]=>
- string(0) ""
- [63]=>
- string(0) ""
- [64]=>
- string(0) ""
- [65]=>
- string(0) ""
- [66]=>
- string(11) "Unspecified"
- [67]=>
- string(0) ""
- [68]=>
- string(0) ""
- [69]=>
- string(0) ""
- [70]=>
- string(4) "J.S."
- [71]=>
- string(0) ""
- [72]=>
- string(0) ""
- [73]=>
- string(0) ""
- [74]=>
- string(0) ""
- [75]=>
- string(0) ""
- [76]=>
- string(0) ""
- [77]=>
- string(16) "PHP
-Perl
-Python
-"
- [78]=>
- string(0) ""
- [79]=>
- string(0) ""
- [80]=>
- string(0) ""
- [81]=>
- string(6) "Normal"
- [82]=>
- string(5) "False"
- [83]=>
- string(0) ""
- [84]=>
- string(0) ""
- [85]=>
- string(6) "Normal"
- [86]=>
- string(0) ""
- [87]=>
- string(0) ""
- [88]=>
- string(0) ""
- [89]=>
- string(0) ""
- [90]=>
- string(0) ""
- [91]=>
- string(0) ""
- }
-}
+++ /dev/null
-"Title","First Name","Middle Name","Last Name","Suffix","Company","Department","Job Title","Business Street","Business Street 2","Business Street 3","Business City","Business State","Business Postal Code","Business Country/Region","Home Street","Home Street 2","Home Street 3","Home City","Home State","Home Postal Code","Home Country/Region","Other Street","Other Street 2","Other Street 3","Other City","Other State","Other Postal Code","Other Country/Region","Assistant's Phone","Business Fax","Business Phone","Business Phone 2","Callback","Car Phone","Company Main Phone","Home Fax","Home Phone","Home Phone 2","ISDN","Mobile Phone","Other Fax","Other Phone","Pager","Primary Phone","Radio Phone","TTY/TDD Phone","Telex","Account","Anniversary","Assistant's Name","Billing Information","Birthday","Business Address PO Box","Categories","Children","Directory Server","E-mail Address","E-mail Type","E-mail Display Name","E-mail 2 Address","E-mail 2 Type","E-mail 2 Display Name","E-mail 3 Address","E-mail 3 Type","E-mail 3 Display Name","Gender","Government ID Number","Hobby","Home Address PO Box","Initials","Internet Free Busy","Keywords","Language","Location","Manager's Name","Mileage","Notes","Office Location","Organizational ID Number","Other Address PO Box","Priority","Private","Profession","Referred By","Sensitivity","Spouse","User 1","User 2","User 3","User 4","Web Page"
-"","","","","","","","","Big Tower'"", 1"" Floor
-123 Main Street",,,"","","","","",,,"","","","","",,,"","","","","","","","","","","","","","","","","","","","","","","","","0/0/00","",,"0/0/00",,,,,"","","",,,,,,,"Unspecified","",,,"","","","","","",,,"","",,"Normal","False","",,"Normal","","","","","",""
+++ /dev/null
---TEST--
-Horde_File_Csv: test for Bug #6370
---FILE--
-<?php
-
-require_once dirname(__FILE__) . '/../../../lib/Horde/Csv.php';
-
-$file = dirname(__FILE__) . '/bug_6370.csv';
-
-// Explicit conf since we can't detect these settings. Might be able
-// to improve auto-detection, but it definitely should work with the
-// settings specified explicitly.
-// var_dump(Horde_File_Csv::discoverFormat($file));
-$conf['crlf'] = "\n";
-$conf['sep'] = ',';
-$conf['fields'] = 92;
-$conf['quote'] = '"';
-
-$csv = array();
-while ($row = Horde_File_Csv::read($file, $conf)) {
- if (is_a($row, 'PEAR_Error')) {
- var_dump($row);
- exit;
- }
- $csv[] = $row;
-}
-var_dump($csv);
-$warnings = Horde_File_Csv::warning();
-if (count($warnings)) {
- var_dump($warnings);
-}
-
-?>
---EXPECT--
-array(2) {
- [0]=>
- array(92) {
- [0]=>
- string(5) "Title"
- [1]=>
- string(10) "First Name"
- [2]=>
- string(11) "Middle Name"
- [3]=>
- string(9) "Last Name"
- [4]=>
- string(6) "Suffix"
- [5]=>
- string(7) "Company"
- [6]=>
- string(10) "Department"
- [7]=>
- string(9) "Job Title"
- [8]=>
- string(15) "Business Street"
- [9]=>
- string(17) "Business Street 2"
- [10]=>
- string(17) "Business Street 3"
- [11]=>
- string(13) "Business City"
- [12]=>
- string(14) "Business State"
- [13]=>
- string(20) "Business Postal Code"
- [14]=>
- string(23) "Business Country/Region"
- [15]=>
- string(11) "Home Street"
- [16]=>
- string(13) "Home Street 2"
- [17]=>
- string(13) "Home Street 3"
- [18]=>
- string(9) "Home City"
- [19]=>
- string(10) "Home State"
- [20]=>
- string(16) "Home Postal Code"
- [21]=>
- string(19) "Home Country/Region"
- [22]=>
- string(12) "Other Street"
- [23]=>
- string(14) "Other Street 2"
- [24]=>
- string(14) "Other Street 3"
- [25]=>
- string(10) "Other City"
- [26]=>
- string(11) "Other State"
- [27]=>
- string(17) "Other Postal Code"
- [28]=>
- string(20) "Other Country/Region"
- [29]=>
- string(17) "Assistant's Phone"
- [30]=>
- string(12) "Business Fax"
- [31]=>
- string(14) "Business Phone"
- [32]=>
- string(16) "Business Phone 2"
- [33]=>
- string(8) "Callback"
- [34]=>
- string(9) "Car Phone"
- [35]=>
- string(18) "Company Main Phone"
- [36]=>
- string(8) "Home Fax"
- [37]=>
- string(10) "Home Phone"
- [38]=>
- string(12) "Home Phone 2"
- [39]=>
- string(4) "ISDN"
- [40]=>
- string(12) "Mobile Phone"
- [41]=>
- string(9) "Other Fax"
- [42]=>
- string(11) "Other Phone"
- [43]=>
- string(5) "Pager"
- [44]=>
- string(13) "Primary Phone"
- [45]=>
- string(11) "Radio Phone"
- [46]=>
- string(13) "TTY/TDD Phone"
- [47]=>
- string(5) "Telex"
- [48]=>
- string(7) "Account"
- [49]=>
- string(11) "Anniversary"
- [50]=>
- string(16) "Assistant's Name"
- [51]=>
- string(19) "Billing Information"
- [52]=>
- string(8) "Birthday"
- [53]=>
- string(23) "Business Address PO Box"
- [54]=>
- string(10) "Categories"
- [55]=>
- string(8) "Children"
- [56]=>
- string(16) "Directory Server"
- [57]=>
- string(14) "E-mail Address"
- [58]=>
- string(11) "E-mail Type"
- [59]=>
- string(19) "E-mail Display Name"
- [60]=>
- string(16) "E-mail 2 Address"
- [61]=>
- string(13) "E-mail 2 Type"
- [62]=>
- string(21) "E-mail 2 Display Name"
- [63]=>
- string(16) "E-mail 3 Address"
- [64]=>
- string(13) "E-mail 3 Type"
- [65]=>
- string(21) "E-mail 3 Display Name"
- [66]=>
- string(6) "Gender"
- [67]=>
- string(20) "Government ID Number"
- [68]=>
- string(5) "Hobby"
- [69]=>
- string(19) "Home Address PO Box"
- [70]=>
- string(8) "Initials"
- [71]=>
- string(18) "Internet Free Busy"
- [72]=>
- string(8) "Keywords"
- [73]=>
- string(8) "Language"
- [74]=>
- string(8) "Location"
- [75]=>
- string(14) "Manager's Name"
- [76]=>
- string(7) "Mileage"
- [77]=>
- string(5) "Notes"
- [78]=>
- string(15) "Office Location"
- [79]=>
- string(24) "Organizational ID Number"
- [80]=>
- string(20) "Other Address PO Box"
- [81]=>
- string(8) "Priority"
- [82]=>
- string(7) "Private"
- [83]=>
- string(10) "Profession"
- [84]=>
- string(11) "Referred By"
- [85]=>
- string(11) "Sensitivity"
- [86]=>
- string(6) "Spouse"
- [87]=>
- string(6) "User 1"
- [88]=>
- string(6) "User 2"
- [89]=>
- string(6) "User 3"
- [90]=>
- string(6) "User 4"
- [91]=>
- string(8) "Web Page"
- }
- [1]=>
- array(92) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
- [2]=>
- string(0) ""
- [3]=>
- string(0) ""
- [4]=>
- string(0) ""
- [5]=>
- string(0) ""
- [6]=>
- string(0) ""
- [7]=>
- string(0) ""
- [8]=>
- string(37) "Big Tower'", 1" Floor
-123 Main Street"
- [9]=>
- string(0) ""
- [10]=>
- string(0) ""
- [11]=>
- string(0) ""
- [12]=>
- string(0) ""
- [13]=>
- string(0) ""
- [14]=>
- string(0) ""
- [15]=>
- string(0) ""
- [16]=>
- string(0) ""
- [17]=>
- string(0) ""
- [18]=>
- string(0) ""
- [19]=>
- string(0) ""
- [20]=>
- string(0) ""
- [21]=>
- string(0) ""
- [22]=>
- string(0) ""
- [23]=>
- string(0) ""
- [24]=>
- string(0) ""
- [25]=>
- string(0) ""
- [26]=>
- string(0) ""
- [27]=>
- string(0) ""
- [28]=>
- string(0) ""
- [29]=>
- string(0) ""
- [30]=>
- string(0) ""
- [31]=>
- string(0) ""
- [32]=>
- string(0) ""
- [33]=>
- string(0) ""
- [34]=>
- string(0) ""
- [35]=>
- string(0) ""
- [36]=>
- string(0) ""
- [37]=>
- string(0) ""
- [38]=>
- string(0) ""
- [39]=>
- string(0) ""
- [40]=>
- string(0) ""
- [41]=>
- string(0) ""
- [42]=>
- string(0) ""
- [43]=>
- string(0) ""
- [44]=>
- string(0) ""
- [45]=>
- string(0) ""
- [46]=>
- string(0) ""
- [47]=>
- string(0) ""
- [48]=>
- string(0) ""
- [49]=>
- string(6) "0/0/00"
- [50]=>
- string(0) ""
- [51]=>
- string(0) ""
- [52]=>
- string(6) "0/0/00"
- [53]=>
- string(0) ""
- [54]=>
- string(0) ""
- [55]=>
- string(0) ""
- [56]=>
- string(0) ""
- [57]=>
- string(0) ""
- [58]=>
- string(0) ""
- [59]=>
- string(0) ""
- [60]=>
- string(0) ""
- [61]=>
- string(0) ""
- [62]=>
- string(0) ""
- [63]=>
- string(0) ""
- [64]=>
- string(0) ""
- [65]=>
- string(0) ""
- [66]=>
- string(11) "Unspecified"
- [67]=>
- string(0) ""
- [68]=>
- string(0) ""
- [69]=>
- string(0) ""
- [70]=>
- string(0) ""
- [71]=>
- string(0) ""
- [72]=>
- string(0) ""
- [73]=>
- string(0) ""
- [74]=>
- string(0) ""
- [75]=>
- string(0) ""
- [76]=>
- string(0) ""
- [77]=>
- string(1) ""
- [78]=>
- string(0) ""
- [79]=>
- string(0) ""
- [80]=>
- string(0) ""
- [81]=>
- string(6) "Normal"
- [82]=>
- string(5) "False"
- [83]=>
- string(0) ""
- [84]=>
- string(0) ""
- [85]=>
- string(6) "Normal"
- [86]=>
- string(0) ""
- [87]=>
- string(0) ""
- [88]=>
- string(0) ""
- [89]=>
- string(0) ""
- [90]=>
- string(0) ""
- [91]=>
- string(0) ""
- }
-}
+++ /dev/null
-"Title","First Name","Middle Name","Last Name","Suffix","Company","Department","Job Title","Business Street","Business Street 2","Business Street 3","Business City","Business State","Business Postal Code","Business Country/Region","Home Street","Home Street 2","Home Street 3","Home City","Home State","Home Postal Code","Home Country/Region","Other Street","Other Street 2","Other Street 3","Other City","Other State","Other Postal Code","Other Country/Region","Assistant's Phone","Business Fax","Business Phone","Business Phone 2","Callback","Car Phone","Company Main Phone","Home Fax","Home Phone","Home Phone 2","ISDN","Mobile Phone","Other Fax","Other Phone","Pager","Primary Phone","Radio Phone","TTY/TDD Phone","Telex","Account","Anniversary","Assistant's Name","Billing Information","Birthday","Business Address PO Box","Categories","Children","Directory Server","E-mail Address","E-mail Type","E-mail Display Name","E-mail 2 Address","E-mail 2 Type","E-mail 2 Display Name","E-mail 3 Address","E-mail 3 Type","E-mail 3 Display Name","Gender","Government ID Number","Hobby","Home Address PO Box","Initials","Internet Free Busy","Keywords","Language","Location","Manager's Name","Mileage","Notes","Office Location","Organizational ID Number","Other Address PO Box","Priority","Private","Profession","Referred By","Sensitivity","Spouse","User 1","User 2","User 3","User 4","Web Page"
-"","","","","","","","","123, 12th Floor,
-Main Street",,,"","","","","",,,"","","","","",,,"","","","","","","","","","","","","","","","","","","","","","","","","0/0/00","",,"0/0/00",,"",,,"","","","","","",,,,"Unspecified","",,,"","","","","","",,"
-","","",,"Normal","False","",,"Normal","","","","","",""
+++ /dev/null
---TEST--
-Horde_File_Csv: test for Bug #6372
---FILE--
-<?php
-
-require_once dirname(__FILE__) . '/../../../lib/Horde/Csv.php';
-
-$file = dirname(__FILE__) . '/bug_6372.csv';
-
-// Explicit conf since we can't detect these settings. Might be able
-// to improve auto-detection, but it definitely should work with the
-// settings specified explicitly.
-// var_dump(Horde_File_Csv::discoverFormat($file));
-$conf['crlf'] = "\n";
-$conf['sep'] = ',';
-$conf['fields'] = 92;
-$conf['quote'] = '"';
-
-$csv = array();
-while ($row = Horde_File_Csv::read($file, $conf)) {
- if (is_a($row, 'PEAR_Error')) {
- var_dump($row);
- exit;
- }
- $csv[] = $row;
-}
-var_dump($csv);
-$warnings = Horde_File_Csv::warning();
-if (count($warnings)) {
- var_dump($warnings);
-}
-
-?>
---EXPECT--
-array(2) {
- [0]=>
- array(92) {
- [0]=>
- string(5) "Title"
- [1]=>
- string(10) "First Name"
- [2]=>
- string(11) "Middle Name"
- [3]=>
- string(9) "Last Name"
- [4]=>
- string(6) "Suffix"
- [5]=>
- string(7) "Company"
- [6]=>
- string(10) "Department"
- [7]=>
- string(9) "Job Title"
- [8]=>
- string(15) "Business Street"
- [9]=>
- string(17) "Business Street 2"
- [10]=>
- string(17) "Business Street 3"
- [11]=>
- string(13) "Business City"
- [12]=>
- string(14) "Business State"
- [13]=>
- string(20) "Business Postal Code"
- [14]=>
- string(23) "Business Country/Region"
- [15]=>
- string(11) "Home Street"
- [16]=>
- string(13) "Home Street 2"
- [17]=>
- string(13) "Home Street 3"
- [18]=>
- string(9) "Home City"
- [19]=>
- string(10) "Home State"
- [20]=>
- string(16) "Home Postal Code"
- [21]=>
- string(19) "Home Country/Region"
- [22]=>
- string(12) "Other Street"
- [23]=>
- string(14) "Other Street 2"
- [24]=>
- string(14) "Other Street 3"
- [25]=>
- string(10) "Other City"
- [26]=>
- string(11) "Other State"
- [27]=>
- string(17) "Other Postal Code"
- [28]=>
- string(20) "Other Country/Region"
- [29]=>
- string(17) "Assistant's Phone"
- [30]=>
- string(12) "Business Fax"
- [31]=>
- string(14) "Business Phone"
- [32]=>
- string(16) "Business Phone 2"
- [33]=>
- string(8) "Callback"
- [34]=>
- string(9) "Car Phone"
- [35]=>
- string(18) "Company Main Phone"
- [36]=>
- string(8) "Home Fax"
- [37]=>
- string(10) "Home Phone"
- [38]=>
- string(12) "Home Phone 2"
- [39]=>
- string(4) "ISDN"
- [40]=>
- string(12) "Mobile Phone"
- [41]=>
- string(9) "Other Fax"
- [42]=>
- string(11) "Other Phone"
- [43]=>
- string(5) "Pager"
- [44]=>
- string(13) "Primary Phone"
- [45]=>
- string(11) "Radio Phone"
- [46]=>
- string(13) "TTY/TDD Phone"
- [47]=>
- string(5) "Telex"
- [48]=>
- string(7) "Account"
- [49]=>
- string(11) "Anniversary"
- [50]=>
- string(16) "Assistant's Name"
- [51]=>
- string(19) "Billing Information"
- [52]=>
- string(8) "Birthday"
- [53]=>
- string(23) "Business Address PO Box"
- [54]=>
- string(10) "Categories"
- [55]=>
- string(8) "Children"
- [56]=>
- string(16) "Directory Server"
- [57]=>
- string(14) "E-mail Address"
- [58]=>
- string(11) "E-mail Type"
- [59]=>
- string(19) "E-mail Display Name"
- [60]=>
- string(16) "E-mail 2 Address"
- [61]=>
- string(13) "E-mail 2 Type"
- [62]=>
- string(21) "E-mail 2 Display Name"
- [63]=>
- string(16) "E-mail 3 Address"
- [64]=>
- string(13) "E-mail 3 Type"
- [65]=>
- string(21) "E-mail 3 Display Name"
- [66]=>
- string(6) "Gender"
- [67]=>
- string(20) "Government ID Number"
- [68]=>
- string(5) "Hobby"
- [69]=>
- string(19) "Home Address PO Box"
- [70]=>
- string(8) "Initials"
- [71]=>
- string(18) "Internet Free Busy"
- [72]=>
- string(8) "Keywords"
- [73]=>
- string(8) "Language"
- [74]=>
- string(8) "Location"
- [75]=>
- string(14) "Manager's Name"
- [76]=>
- string(7) "Mileage"
- [77]=>
- string(5) "Notes"
- [78]=>
- string(15) "Office Location"
- [79]=>
- string(24) "Organizational ID Number"
- [80]=>
- string(20) "Other Address PO Box"
- [81]=>
- string(8) "Priority"
- [82]=>
- string(7) "Private"
- [83]=>
- string(10) "Profession"
- [84]=>
- string(11) "Referred By"
- [85]=>
- string(11) "Sensitivity"
- [86]=>
- string(6) "Spouse"
- [87]=>
- string(6) "User 1"
- [88]=>
- string(6) "User 2"
- [89]=>
- string(6) "User 3"
- [90]=>
- string(6) "User 4"
- [91]=>
- string(8) "Web Page"
- }
- [1]=>
- array(92) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
- [2]=>
- string(0) ""
- [3]=>
- string(0) ""
- [4]=>
- string(0) ""
- [5]=>
- string(0) ""
- [6]=>
- string(0) ""
- [7]=>
- string(0) ""
- [8]=>
- string(28) "123, 12th Floor,
-Main Street"
- [9]=>
- string(0) ""
- [10]=>
- string(0) ""
- [11]=>
- string(0) ""
- [12]=>
- string(0) ""
- [13]=>
- string(0) ""
- [14]=>
- string(0) ""
- [15]=>
- string(0) ""
- [16]=>
- string(0) ""
- [17]=>
- string(0) ""
- [18]=>
- string(0) ""
- [19]=>
- string(0) ""
- [20]=>
- string(0) ""
- [21]=>
- string(0) ""
- [22]=>
- string(0) ""
- [23]=>
- string(0) ""
- [24]=>
- string(0) ""
- [25]=>
- string(0) ""
- [26]=>
- string(0) ""
- [27]=>
- string(0) ""
- [28]=>
- string(0) ""
- [29]=>
- string(0) ""
- [30]=>
- string(0) ""
- [31]=>
- string(0) ""
- [32]=>
- string(0) ""
- [33]=>
- string(0) ""
- [34]=>
- string(0) ""
- [35]=>
- string(0) ""
- [36]=>
- string(0) ""
- [37]=>
- string(0) ""
- [38]=>
- string(0) ""
- [39]=>
- string(0) ""
- [40]=>
- string(0) ""
- [41]=>
- string(0) ""
- [42]=>
- string(0) ""
- [43]=>
- string(0) ""
- [44]=>
- string(0) ""
- [45]=>
- string(0) ""
- [46]=>
- string(0) ""
- [47]=>
- string(0) ""
- [48]=>
- string(0) ""
- [49]=>
- string(6) "0/0/00"
- [50]=>
- string(0) ""
- [51]=>
- string(0) ""
- [52]=>
- string(6) "0/0/00"
- [53]=>
- string(0) ""
- [54]=>
- string(0) ""
- [55]=>
- string(0) ""
- [56]=>
- string(0) ""
- [57]=>
- string(0) ""
- [58]=>
- string(0) ""
- [59]=>
- string(0) ""
- [60]=>
- string(0) ""
- [61]=>
- string(0) ""
- [62]=>
- string(0) ""
- [63]=>
- string(0) ""
- [64]=>
- string(0) ""
- [65]=>
- string(0) ""
- [66]=>
- string(11) "Unspecified"
- [67]=>
- string(0) ""
- [68]=>
- string(0) ""
- [69]=>
- string(0) ""
- [70]=>
- string(0) ""
- [71]=>
- string(0) ""
- [72]=>
- string(0) ""
- [73]=>
- string(0) ""
- [74]=>
- string(0) ""
- [75]=>
- string(0) ""
- [76]=>
- string(0) ""
- [77]=>
- string(1) "
-"
- [78]=>
- string(0) ""
- [79]=>
- string(0) ""
- [80]=>
- string(0) ""
- [81]=>
- string(6) "Normal"
- [82]=>
- string(5) "False"
- [83]=>
- string(0) ""
- [84]=>
- string(0) ""
- [85]=>
- string(6) "Normal"
- [86]=>
- string(0) ""
- [87]=>
- string(0) ""
- [88]=>
- string(0) ""
- [89]=>
- string(0) ""
- [90]=>
- string(0) ""
- [91]=>
- string(0) ""
- }
-}
+++ /dev/null
---TEST--
-Horde_File_Csv: column count tests
---FILE--
-<?php
-
-require dirname(__FILE__) . '/common.php';
-test_csv('columns1', 'columns2');
-
-?>
---EXPECT--
-array(4) {
- [0]=>
- array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(5) "three"
- }
- [1]=>
- array(3) {
- [0]=>
- string(4) "four"
- [1]=>
- string(4) "five"
- [2]=>
- string(0) ""
- }
- [2]=>
- array(3) {
- [0]=>
- string(3) "six"
- [1]=>
- string(5) "seven"
- [2]=>
- string(5) "eight"
- }
- [3]=>
- array(3) {
- [0]=>
- string(4) "nine"
- [1]=>
- string(3) "ten"
- [2]=>
- string(6) "eleven"
- }
-}
-array(2) {
- [0]=>
- string(54) "Wrong number of fields in line 2. Expected 3, found 2."
- [1]=>
- string(48) "More fields found in line 4 than the expected 3."
-}
-array(4) {
- [0]=>
- array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(5) "three"
- }
- [1]=>
- array(3) {
- [0]=>
- string(4) "four"
- [1]=>
- string(4) "five"
- [2]=>
- string(0) ""
- }
- [2]=>
- array(3) {
- [0]=>
- string(3) "six"
- [1]=>
- string(5) "seven"
- [2]=>
- string(5) "eight"
- }
- [3]=>
- array(3) {
- [0]=>
- string(4) "nine"
- [1]=>
- string(3) "ten"
- [2]=>
- string(6) "eleven"
- }
-}
-array(2) {
- [0]=>
- string(54) "Wrong number of fields in line 2. Expected 3, found 2."
- [1]=>
- string(48) "More fields found in line 4 than the expected 3."
-}
+++ /dev/null
-one,two,three
-four,five
-six,seven,eight
-nine,ten,eleven,twelve
+++ /dev/null
-"one","two","three"
-"four","five"
-"six","seven","eight"
-"nine","ten","eleven","twelve"
+++ /dev/null
-<?php
-/**
- * @package Horde_File_Csv
- */
-
-require_once dirname(__FILE__) . '/../../../lib/Horde/Csv.php';
-
-function test_csv()
-{
- foreach (func_get_args() as $file) {
- $file = dirname(__FILE__) . '/' . $file . '.csv';
- try {
- $conf = Horde_File_Csv::discoverFormat($file);
- } catch (Horde_File_Csv_Exception $e) {
- var_dump($conf);
- return;
- }
-
- $csv = array();
- try {
- while ($row = Horde_File_Csv::read($file, $conf)) {
- $csv[] = $row;
- }
- } catch (Horde_File_Csv_Exception $e) {
- var_dump($row);
- return;
- }
-
- var_dump($csv);
-
- $warnings = Horde_File_Csv::warning();
- if (count($warnings)) {
- var_dump($warnings);
- }
- }
-}
+++ /dev/null
---TEST--
-Horde_File_Csv: linebreak tests
---FILE--
-<?php
-
-require dirname(__FILE__) . '/common.php';
-test_csv('simple_cr', 'simple_lf', 'simple_crlf', 'notrailing_lf', 'notrailing_crlf');
-
-?>
---EXPECT--
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(5) "three"
- }
- [1]=>
- array(3) {
- [0]=>
- string(4) "four"
- [1]=>
- string(4) "five"
- [2]=>
- string(3) "six"
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(5) "three"
- }
- [1]=>
- array(3) {
- [0]=>
- string(4) "four"
- [1]=>
- string(4) "five"
- [2]=>
- string(3) "six"
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(5) "three"
- }
- [1]=>
- array(3) {
- [0]=>
- string(4) "four"
- [1]=>
- string(4) "five"
- [2]=>
- string(3) "six"
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(5) "three"
- }
- [1]=>
- array(3) {
- [0]=>
- string(4) "four"
- [1]=>
- string(4) "five"
- [2]=>
- string(3) "six"
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(5) "three"
- }
- [1]=>
- array(3) {
- [0]=>
- string(4) "four"
- [1]=>
- string(4) "five"
- [2]=>
- string(3) "six"
- }
-}
+++ /dev/null
---TEST--
-Horde_File_Csv: multiline tests
---FILE--
-<?php
-
-require dirname(__FILE__) . '/common.php';
-test_csv('multiline1');
-
-?>
---EXPECT--
-array(4) {
- [0]=>
- array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(10) "three
-four"
- }
- [1]=>
- array(3) {
- [0]=>
- string(4) "five"
- [1]=>
- string(9) "six
-seven"
- [2]=>
- string(5) "eight"
- }
- [2]=>
- array(3) {
- [0]=>
- string(4) "nine"
- [1]=>
- string(3) "ten"
- [2]=>
- string(14) "eleven
-twelve"
- }
- [3]=>
- array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(11) "three
- four"
- }
-}
+++ /dev/null
-"one","two","three
-four"
-"five","six
-seven","eight"
-"nine","ten","eleven
-twelve"
-"one","two","three
- four"
+++ /dev/null
-one,two,three
-four,five,six
+++ /dev/null
-one,two,three
-four,five,six
+++ /dev/null
-"one",two,"three"
-four,"five six",seven
+++ /dev/null
-"one",two,"three"
-four,"five six",seven
+++ /dev/null
-"one two","three, four",five
-six,"seven ",eight
-
+++ /dev/null
-"one two","three, four",five
-six,"seven ",eight
-
+++ /dev/null
-"one two","three, four","five"
-"six","seven ","eight"
+++ /dev/null
---TEST--
-Horde_File_Csv: quote tests
---FILE--
-<?php
-
-require dirname(__FILE__) . '/common.php';
-test_csv('quote1', 'quote2', 'quote3', 'quote4', 'quote5');
-
-?>
---EXPECT--
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(5) "three"
- }
- [1]=>
- array(3) {
- [0]=>
- string(4) "four"
- [1]=>
- string(8) "five six"
- [2]=>
- string(5) "seven"
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(5) "three"
- }
- [1]=>
- array(3) {
- [0]=>
- string(4) "four"
- [1]=>
- string(8) "five six"
- [2]=>
- string(5) "seven"
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- string(7) "one two"
- [1]=>
- string(11) "three, four"
- [2]=>
- string(4) "five"
- }
- [1]=>
- array(3) {
- [0]=>
- string(3) "six"
- [1]=>
- string(6) "seven "
- [2]=>
- string(5) "eight"
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- string(7) "one two"
- [1]=>
- string(11) "three, four"
- [2]=>
- string(4) "five"
- }
- [1]=>
- array(3) {
- [0]=>
- string(3) "six"
- [1]=>
- string(6) "seven "
- [2]=>
- string(5) "eight"
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- string(7) "one two"
- [1]=>
- string(11) "three, four"
- [2]=>
- string(4) "five"
- }
- [1]=>
- array(3) {
- [0]=>
- string(3) "six"
- [1]=>
- string(6) "seven "
- [2]=>
- string(5) "eight"
- }
-}
+++ /dev/null
-one,two,three\rfour,five,six\r
\ No newline at end of file
+++ /dev/null
-one,two,three
-four,five,six
+++ /dev/null
-one,two,three
-four,five,six
}
/**
+ * Wrapper around fgetcsv().
+ *
+ * Empty lines will be skipped. If the 'length' parameter is provided, all
+ * rows are filled up with empty strings up to this length, or stripped
+ * down to this length.
+ *
+ * @param resource $file A file pointer.
+ * @param array $params Optional parameters. Possible values:
+ * - 'separator': The field delimiter.
+ * - 'quote': The quote character.
+ * - 'escape': The escape character.
+ * - 'length': The expected number of fields.
+ *
+ * @return array|boolean A row from the CSV file or false on error or end
+ * of file.
+ */
+ static public function getCsv($file, $params = array())
+ {
+ $params += array('separator' => ',', 'quote' => '"', 'escape' => '\\');
+
+ // Detect Mac line endings.
+ $old = ini_get('auto_detect_line_endings');
+ ini_set('auto_detect_line_endings', 1);
+
+ do {
+ // fgetcsv() throws a warning if the quote character is empty.
+ if (!strlen($params['quote']) && $params['escape'] != '\\') {
+ $params['quote'] = '"';
+ }
+ if (!strlen($params['quote'])) {
+ $row = fgetcsv($file, 0, $params['separator']);
+ } else {
+ $row = fgetcsv($file, 0, $params['separator'], $params['quote'], $params['escape']);
+ }
+ } while ($row && $row[0] === null);
+
+ ini_set('auto_detect_line_endings', $old);
+
+ if ($row && !empty($params['length'])) {
+ $length = count($row);
+ if ($length < $params['length']) {
+ $row += array_fill($length, $params['length'] - $length, '');
+ } elseif ($length > $params['length']) {
+ array_splice($row, $params['length']);
+ }
+ }
+
+ return $row;
+ }
+
+ /**
* Returns the canonical path of the string. Like PHP's built-in
* realpath() except the directory need not exist on the local server.
*
--- /dev/null
+<?php
+/**
+ * @author Jan Schneider <jan@horde.org>
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @category Horde
+ * @package Util
+ * @subpackage UnitTests
+ */
+
+class Horde_Util_CsvTest extends PHPUnit_Framework_TestCase
+{
+ protected function readCsv($file, $conf = array())
+ {
+ $fp = fopen(dirname(__FILE__) . '/fixtures/' . $file, 'r');
+ $data = array();
+ while ($res = Horde_Util::getCsv($fp, $conf)) {
+ $data[] = $res;
+ }
+ return $data;
+ }
+
+ public function test001()
+ {
+ $this->assertEquals(array (
+ 0 =>
+ array (
+ 0 => 'Field 1-1',
+ 1 => 'Field 1-2',
+ 2 => 'Field 1-3',
+ 3 => 'Field 1-4',
+ ),
+ 1 =>
+ array (
+ 0 => 'Field 2-1',
+ 1 => 'Field 2-2',
+ 2 => 'Field 2-3',
+ 3 => '',
+ ),
+ 2 =>
+ array (
+ 0 => 'Field 3-1',
+ 1 => 'Field 3-2',
+ 2 => '',
+ 3 => '',
+ ),
+ 3 =>
+ array (
+ 0 => 'Field 4-1',
+ 1 => '',
+ 2 => '',
+ 3 => '',
+ ),
+ ),
+ $this->readCsv('001.csv', array('length' => 4)));
+ }
+
+ public function test002()
+ {
+ $this->assertEquals(array (
+ 0 =>
+ array (
+ 0 => 'Field 1-1',
+ 1 => 'Field 1-2',
+ 2 => 'Field 1-3',
+ 3 => 'Field 1-4',
+ ),
+ 1 =>
+ array (
+ 0 => 'Field 2-1',
+ 1 => 'Field 2-2',
+ 2 => 'Field 2-3',
+ 3 => 'Field 2-4',
+ ),
+ 2 =>
+ array (
+ 0 => 'Field 3-1',
+ 1 => 'Field 3-2',
+ 2 => '',
+ 3 => '',
+ ),
+ 3 =>
+ array (
+ 0 => 'Field 4-1',
+ 1 => '',
+ 2 => '',
+ 3 => '',
+ ),
+ ),
+ $this->readCsv('002.csv', array('length' => 4)));
+ }
+
+ public function test003()
+ {
+ $this->assertEquals(array (
+ 0 =>
+ array (
+ 0 => 'Field 1-1',
+ 1 => 'Field 1-2',
+ 2 => 'Field 1-3',
+ 3 => 'Field 1-4',
+ ),
+ 1 =>
+ array (
+ 0 => 'Field 2-1',
+ 1 => 'Field 2-2',
+ 2 => 'Field 2-3',
+ 3 => 'I\'m multiline
+Field',
+ ),
+ 2 =>
+ array (
+ 0 => 'Field 3-1',
+ 1 => 'Field 3-2',
+ 2 => 'Field 3-3',
+ 3 => '',
+ ),
+ ),
+ $this->readCsv('003.csv', array('length' => 4)));
+ }
+
+ public function test004()
+ {
+ $this->assertEquals(array (
+ 0 =>
+ array (
+ 0 => 'Field 1-1',
+ 1 => 'Field 1-2',
+ 2 => 'Field 1-3',
+ 3 => 'Field 1-4',
+ ),
+ 1 =>
+ array (
+ 0 => 'Field 2-1',
+ 1 => 'Field 2-2',
+ 2 => 'Field 2-3',
+ 3 => 'I\'m multiline
+Field',
+ ),
+ 2 =>
+ array (
+ 0 => 'Field 3-1',
+ 1 => 'Field 3-2',
+ 2 => 'Field 3-3',
+ 3 => '',
+ ),
+ ),
+ $this->readCsv('004.csv', array('length' => 4)));
+ }
+
+ public function testBug3839()
+ {
+ $this->assertEquals(array (
+ 0 =>
+ array (
+ 0 => 'Subject',
+ 1 => 'Start Date',
+ 2 => 'Start Time',
+ 3 => 'End Date',
+ 4 => 'End Time',
+ 5 => 'All day event',
+ 6 => 'Reminder on/off',
+ 7 => 'Reminder Date',
+ 8 => 'Reminder Time',
+ 9 => 'Category',
+ 10 => 'Description',
+ 11 => 'Priority',
+ ),
+ 1 =>
+ array (
+ 0 => 'Inservice on new resource: "CPNP Toolkit"',
+ 1 => '2004-11-08',
+ 2 => '10:30 AM',
+ 3 => '2004-11-08',
+ 4 => '11:30 AM',
+ 5 => 'FALSE',
+ 6 => 'FALSE',
+ 7 => '',
+ 8 => '',
+ 9 => 'Training',
+ 10 => 'CPN Program ...
+Inservice on new resource: "CPNP Toolkit"
+
+<b>Registration Deadline: October 27, 2004, noon</b>
+
+<a href="F041108A-Eval.pdf" target="_blank">
+<img src="acrobat.gif" border="0"></a> <a href="F041108A-Eval.pdf" target="_blank"> Session Evaluation - Eligibility for Prize!</a>
+
+<a href="F041108A-DI.pdf" target="_blank">
+<img src="acrobat.gif" border="0"></a> <a href="F041108A-DI.pdf" target="_blank"> Dial In Numbers for Sites Registered</a>
+
+<a href="F041108A.pdf" target="_blank">
+<img src="acrobat.gif" border="0"></a> <a href="F041108A.pdf" target="_blank"> Poster and Registration Form</a>
+
+Facilitator: Manager
+
+preblurb preblurb preblurb preblurb preblurb preblurb preblurb preblurb preblurb "CPNP Toolkit". postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb .
+
+postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb
+
+Come check out the new resource!',
+ 11 => 'Normal',
+ ),
+ ),
+ $this->readCsv('bug_3839.csv', array('length' => 12, 'separator' => '~')));
+ }
+
+ public function testBug4025()
+ {
+ $this->assertEquals(array (
+ 0 =>
+ array (
+ 0 => 'Betreff',
+ 1 => 'Beginnt am',
+ 2 => 'Beginnt um',
+ 3 => 'Endet am',
+ 4 => 'Endet um',
+ 5 => 'Ganztägiges Ereignis',
+ 6 => 'Erinnerung Ein/Aus',
+ 7 => 'Erinnerung am',
+ 8 => 'Erinnerung um',
+ 9 => 'Besprechungsplanung',
+ 10 => 'Erforderliche Teilnehmer',
+ 11 => 'Optionale Teilnehmer',
+ 12 => 'Besprechungsressourcen',
+ 13 => 'Abrechnungsinformationen',
+ 14 => 'Beschreibung',
+ 15 => 'Kategorien',
+ 16 => 'Ort',
+ 17 => 'Priorität',
+ 18 => 'Privat',
+ 19 => 'Reisekilometer',
+ 20 => 'Vertraulichkeit',
+ 21 => 'Zeitspanne zeigen als',
+ ),
+ 1 =>
+ array (
+ 0 => 'Burger Download Session',
+ 1 => '2.5.2006',
+ 2 => '11:50:00',
+ 3 => '2.5.2006',
+ 4 => '13:00:00',
+ 5 => 'Aus',
+ 6 => 'Ein',
+ 7 => '2.5.2006',
+ 8 => '11:35:00',
+ 9 => 'Haas, Jörg',
+ 10 => 'Kuhl, Oliver',
+ 11 => '',
+ 12 => '',
+ 13 => '',
+ 14 => '
+',
+ 15 => '',
+ 16 => 'Burger Upload Station (Burger King)',
+ 17 => 'Normal',
+ 18 => 'Aus',
+ 19 => '',
+ 20 => 'Normal',
+ 21 => '1',
+ ),
+ ),
+ $this->readCsv('bug_4025.csv', array('length' => 22)));
+ }
+
+ public function testBug6311()
+ {
+ $this->assertEquals(array (
+ 0 =>
+ array (
+ 0 => 'Title',
+ 1 => 'First Name',
+ 2 => 'Middle Name',
+ 3 => 'Last Name',
+ 4 => 'Suffix',
+ 5 => 'Company',
+ 6 => 'Department',
+ 7 => 'Job Title',
+ 8 => 'Business Street',
+ 9 => 'Business Street 2',
+ 10 => 'Business Street 3',
+ 11 => 'Business City',
+ 12 => 'Business State',
+ 13 => 'Business Postal Code',
+ 14 => 'Business Country/Region',
+ 15 => 'Home Street',
+ 16 => 'Home Street 2',
+ 17 => 'Home Street 3',
+ 18 => 'Home City',
+ 19 => 'Home State',
+ 20 => 'Home Postal Code',
+ 21 => 'Home Country/Region',
+ 22 => 'Other Street',
+ 23 => 'Other Street 2',
+ 24 => 'Other Street 3',
+ 25 => 'Other City',
+ 26 => 'Other State',
+ 27 => 'Other Postal Code',
+ 28 => 'Other Country/Region',
+ 29 => 'Assistant\'s Phone',
+ 30 => 'Business Fax',
+ 31 => 'Business Phone',
+ 32 => 'Business Phone 2',
+ 33 => 'Callback',
+ 34 => 'Car Phone',
+ 35 => 'Company Main Phone',
+ 36 => 'Home Fax',
+ 37 => 'Home Phone',
+ 38 => 'Home Phone 2',
+ 39 => 'ISDN',
+ 40 => 'Mobile Phone',
+ 41 => 'Other Fax',
+ 42 => 'Other Phone',
+ 43 => 'Pager',
+ 44 => 'Primary Phone',
+ 45 => 'Radio Phone',
+ 46 => 'TTY/TDD Phone',
+ 47 => 'Telex',
+ 48 => 'Account',
+ 49 => 'Anniversary',
+ 50 => 'Assistant\'s Name',
+ 51 => 'Billing Information',
+ 52 => 'Birthday',
+ 53 => 'Business Address PO Box',
+ 54 => 'Categories',
+ 55 => 'Children',
+ 56 => 'Directory Server',
+ 57 => 'E-mail Address',
+ 58 => 'E-mail Type',
+ 59 => 'E-mail Display Name',
+ 60 => 'E-mail 2 Address',
+ 61 => 'E-mail 2 Type',
+ 62 => 'E-mail 2 Display Name',
+ 63 => 'E-mail 3 Address',
+ 64 => 'E-mail 3 Type',
+ 65 => 'E-mail 3 Display Name',
+ 66 => 'Gender',
+ 67 => 'Government ID Number',
+ 68 => 'Hobby',
+ 69 => 'Home Address PO Box',
+ 70 => 'Initials',
+ 71 => 'Internet Free Busy',
+ 72 => 'Keywords',
+ 73 => 'Language',
+ 74 => 'Location',
+ 75 => 'Manager\'s Name',
+ 76 => 'Mileage',
+ 77 => 'Notes',
+ 78 => 'Office Location',
+ 79 => 'Organizational ID Number',
+ 80 => 'Other Address PO Box',
+ 81 => 'Priority',
+ 82 => 'Private',
+ 83 => 'Profession',
+ 84 => 'Referred By',
+ 85 => 'Sensitivity',
+ 86 => 'Spouse',
+ 87 => 'User 1',
+ 88 => 'User 2',
+ 89 => 'User 3',
+ 90 => 'User 4',
+ 91 => 'Web Page',
+ ),
+ 1 =>
+ array (
+ 0 => '',
+ 1 => 'John',
+ 2 => '',
+ 3 => 'Smith',
+ 4 => '',
+ 5 => 'International Inc',
+ 6 => '',
+ 7 => '',
+ 8 => '',
+ 9 => '',
+ 10 => '',
+ 11 => '',
+ 12 => '',
+ 13 => '',
+ 14 => '',
+ 15 => '',
+ 16 => '',
+ 17 => '',
+ 18 => '',
+ 19 => '',
+ 20 => '',
+ 21 => '',
+ 22 => '',
+ 23 => '',
+ 24 => '',
+ 25 => '',
+ 26 => '',
+ 27 => '',
+ 28 => '',
+ 29 => '',
+ 30 => '(123) 555-1111',
+ 31 => '(123) 555-2222',
+ 32 => '',
+ 33 => '',
+ 34 => '',
+ 35 => '',
+ 36 => '',
+ 37 => '',
+ 38 => '',
+ 39 => '',
+ 40 => '(123) 555-3333',
+ 41 => '',
+ 42 => '',
+ 43 => '',
+ 44 => '',
+ 45 => '',
+ 46 => '',
+ 47 => '',
+ 48 => '',
+ 49 => '0/0/00',
+ 50 => '',
+ 51 => '',
+ 52 => '0/0/00',
+ 53 => '',
+ 54 => 'Programming',
+ 55 => '',
+ 56 => '',
+ 57 => 'john@example.com',
+ 58 => 'SMTP',
+ 59 => 'John Smith (john@example.com)',
+ 60 => '',
+ 61 => '',
+ 62 => '',
+ 63 => '',
+ 64 => '',
+ 65 => '',
+ 66 => 'Unspecified',
+ 67 => '',
+ 68 => '',
+ 69 => '',
+ 70 => 'J.S.',
+ 71 => '',
+ 72 => '',
+ 73 => '',
+ 74 => '',
+ 75 => '',
+ 76 => '',
+ 77 => 'PHP
+Perl
+Python
+',
+ 78 => '',
+ 79 => '',
+ 80 => '',
+ 81 => 'Normal',
+ 82 => 'False',
+ 83 => '',
+ 84 => '',
+ 85 => 'Normal',
+ 86 => '',
+ 87 => '',
+ 88 => '',
+ 89 => '',
+ 90 => '',
+ 91 => '',
+ ),
+ ),
+ $this->readCsv('bug_6311.csv', array('length' => 92)));
+ }
+
+ public function testBug6370()
+ {
+ $this->assertEquals(array (
+ 0 =>
+ array (
+ 0 => 'Title',
+ 1 => 'First Name',
+ 2 => 'Middle Name',
+ 3 => 'Last Name',
+ 4 => 'Suffix',
+ 5 => 'Company',
+ 6 => 'Department',
+ 7 => 'Job Title',
+ 8 => 'Business Street',
+ 9 => 'Business Street 2',
+ 10 => 'Business Street 3',
+ 11 => 'Business City',
+ 12 => 'Business State',
+ 13 => 'Business Postal Code',
+ 14 => 'Business Country/Region',
+ 15 => 'Home Street',
+ 16 => 'Home Street 2',
+ 17 => 'Home Street 3',
+ 18 => 'Home City',
+ 19 => 'Home State',
+ 20 => 'Home Postal Code',
+ 21 => 'Home Country/Region',
+ 22 => 'Other Street',
+ 23 => 'Other Street 2',
+ 24 => 'Other Street 3',
+ 25 => 'Other City',
+ 26 => 'Other State',
+ 27 => 'Other Postal Code',
+ 28 => 'Other Country/Region',
+ 29 => 'Assistant\'s Phone',
+ 30 => 'Business Fax',
+ 31 => 'Business Phone',
+ 32 => 'Business Phone 2',
+ 33 => 'Callback',
+ 34 => 'Car Phone',
+ 35 => 'Company Main Phone',
+ 36 => 'Home Fax',
+ 37 => 'Home Phone',
+ 38 => 'Home Phone 2',
+ 39 => 'ISDN',
+ 40 => 'Mobile Phone',
+ 41 => 'Other Fax',
+ 42 => 'Other Phone',
+ 43 => 'Pager',
+ 44 => 'Primary Phone',
+ 45 => 'Radio Phone',
+ 46 => 'TTY/TDD Phone',
+ 47 => 'Telex',
+ 48 => 'Account',
+ 49 => 'Anniversary',
+ 50 => 'Assistant\'s Name',
+ 51 => 'Billing Information',
+ 52 => 'Birthday',
+ 53 => 'Business Address PO Box',
+ 54 => 'Categories',
+ 55 => 'Children',
+ 56 => 'Directory Server',
+ 57 => 'E-mail Address',
+ 58 => 'E-mail Type',
+ 59 => 'E-mail Display Name',
+ 60 => 'E-mail 2 Address',
+ 61 => 'E-mail 2 Type',
+ 62 => 'E-mail 2 Display Name',
+ 63 => 'E-mail 3 Address',
+ 64 => 'E-mail 3 Type',
+ 65 => 'E-mail 3 Display Name',
+ 66 => 'Gender',
+ 67 => 'Government ID Number',
+ 68 => 'Hobby',
+ 69 => 'Home Address PO Box',
+ 70 => 'Initials',
+ 71 => 'Internet Free Busy',
+ 72 => 'Keywords',
+ 73 => 'Language',
+ 74 => 'Location',
+ 75 => 'Manager\'s Name',
+ 76 => 'Mileage',
+ 77 => 'Notes',
+ 78 => 'Office Location',
+ 79 => 'Organizational ID Number',
+ 80 => 'Other Address PO Box',
+ 81 => 'Priority',
+ 82 => 'Private',
+ 83 => 'Profession',
+ 84 => 'Referred By',
+ 85 => 'Sensitivity',
+ 86 => 'Spouse',
+ 87 => 'User 1',
+ 88 => 'User 2',
+ 89 => 'User 3',
+ 90 => 'User 4',
+ 91 => 'Web Page',
+ ),
+ 1 =>
+ array (
+ 0 => '',
+ 1 => '',
+ 2 => '',
+ 3 => '',
+ 4 => '',
+ 5 => '',
+ 6 => '',
+ 7 => '',
+ 8 => 'Big Tower\'", 1" Floor
+123 Main Street',
+ 9 => '',
+ 10 => '',
+ 11 => '',
+ 12 => '',
+ 13 => '',
+ 14 => '',
+ 15 => '',
+ 16 => '',
+ 17 => '',
+ 18 => '',
+ 19 => '',
+ 20 => '',
+ 21 => '',
+ 22 => '',
+ 23 => '',
+ 24 => '',
+ 25 => '',
+ 26 => '',
+ 27 => '',
+ 28 => '',
+ 29 => '',
+ 30 => '',
+ 31 => '',
+ 32 => '',
+ 33 => '',
+ 34 => '',
+ 35 => '',
+ 36 => '',
+ 37 => '',
+ 38 => '',
+ 39 => '',
+ 40 => '',
+ 41 => '',
+ 42 => '',
+ 43 => '',
+ 44 => '',
+ 45 => '',
+ 46 => '',
+ 47 => '',
+ 48 => '',
+ 49 => '0/0/00',
+ 50 => '',
+ 51 => '',
+ 52 => '0/0/00',
+ 53 => '',
+ 54 => '',
+ 55 => '',
+ 56 => '',
+ 57 => '',
+ 58 => '',
+ 59 => '',
+ 60 => '',
+ 61 => '',
+ 62 => '',
+ 63 => '',
+ 64 => '',
+ 65 => '',
+ 66 => 'Unspecified',
+ 67 => '',
+ 68 => '',
+ 69 => '',
+ 70 => '',
+ 71 => '',
+ 72 => '',
+ 73 => '',
+ 74 => '',
+ 75 => '',
+ 76 => '',
+ 77 => '',
+ 78 => '',
+ 79 => '',
+ 80 => '',
+ 81 => 'Normal',
+ 82 => 'False',
+ 83 => '',
+ 84 => '',
+ 85 => 'Normal',
+ 86 => '',
+ 87 => '',
+ 88 => '',
+ 89 => '',
+ 90 => '',
+ 91 => '',
+ ),
+ ),
+ $this->readCsv('bug_6370.csv', array('length' => 92)));
+ }
+
+ public function testBug6372()
+ {
+ $this->assertEquals(array (
+ 0 =>
+ array (
+ 0 => 'Title',
+ 1 => 'First Name',
+ 2 => 'Middle Name',
+ 3 => 'Last Name',
+ 4 => 'Suffix',
+ 5 => 'Company',
+ 6 => 'Department',
+ 7 => 'Job Title',
+ 8 => 'Business Street',
+ 9 => 'Business Street 2',
+ 10 => 'Business Street 3',
+ 11 => 'Business City',
+ 12 => 'Business State',
+ 13 => 'Business Postal Code',
+ 14 => 'Business Country/Region',
+ 15 => 'Home Street',
+ 16 => 'Home Street 2',
+ 17 => 'Home Street 3',
+ 18 => 'Home City',
+ 19 => 'Home State',
+ 20 => 'Home Postal Code',
+ 21 => 'Home Country/Region',
+ 22 => 'Other Street',
+ 23 => 'Other Street 2',
+ 24 => 'Other Street 3',
+ 25 => 'Other City',
+ 26 => 'Other State',
+ 27 => 'Other Postal Code',
+ 28 => 'Other Country/Region',
+ 29 => 'Assistant\'s Phone',
+ 30 => 'Business Fax',
+ 31 => 'Business Phone',
+ 32 => 'Business Phone 2',
+ 33 => 'Callback',
+ 34 => 'Car Phone',
+ 35 => 'Company Main Phone',
+ 36 => 'Home Fax',
+ 37 => 'Home Phone',
+ 38 => 'Home Phone 2',
+ 39 => 'ISDN',
+ 40 => 'Mobile Phone',
+ 41 => 'Other Fax',
+ 42 => 'Other Phone',
+ 43 => 'Pager',
+ 44 => 'Primary Phone',
+ 45 => 'Radio Phone',
+ 46 => 'TTY/TDD Phone',
+ 47 => 'Telex',
+ 48 => 'Account',
+ 49 => 'Anniversary',
+ 50 => 'Assistant\'s Name',
+ 51 => 'Billing Information',
+ 52 => 'Birthday',
+ 53 => 'Business Address PO Box',
+ 54 => 'Categories',
+ 55 => 'Children',
+ 56 => 'Directory Server',
+ 57 => 'E-mail Address',
+ 58 => 'E-mail Type',
+ 59 => 'E-mail Display Name',
+ 60 => 'E-mail 2 Address',
+ 61 => 'E-mail 2 Type',
+ 62 => 'E-mail 2 Display Name',
+ 63 => 'E-mail 3 Address',
+ 64 => 'E-mail 3 Type',
+ 65 => 'E-mail 3 Display Name',
+ 66 => 'Gender',
+ 67 => 'Government ID Number',
+ 68 => 'Hobby',
+ 69 => 'Home Address PO Box',
+ 70 => 'Initials',
+ 71 => 'Internet Free Busy',
+ 72 => 'Keywords',
+ 73 => 'Language',
+ 74 => 'Location',
+ 75 => 'Manager\'s Name',
+ 76 => 'Mileage',
+ 77 => 'Notes',
+ 78 => 'Office Location',
+ 79 => 'Organizational ID Number',
+ 80 => 'Other Address PO Box',
+ 81 => 'Priority',
+ 82 => 'Private',
+ 83 => 'Profession',
+ 84 => 'Referred By',
+ 85 => 'Sensitivity',
+ 86 => 'Spouse',
+ 87 => 'User 1',
+ 88 => 'User 2',
+ 89 => 'User 3',
+ 90 => 'User 4',
+ 91 => 'Web Page',
+ ),
+ 1 =>
+ array (
+ 0 => '',
+ 1 => '',
+ 2 => '',
+ 3 => '',
+ 4 => '',
+ 5 => '',
+ 6 => '',
+ 7 => '',
+ 8 => '123, 12th Floor,
+Main Street',
+ 9 => '',
+ 10 => '',
+ 11 => '',
+ 12 => '',
+ 13 => '',
+ 14 => '',
+ 15 => '',
+ 16 => '',
+ 17 => '',
+ 18 => '',
+ 19 => '',
+ 20 => '',
+ 21 => '',
+ 22 => '',
+ 23 => '',
+ 24 => '',
+ 25 => '',
+ 26 => '',
+ 27 => '',
+ 28 => '',
+ 29 => '',
+ 30 => '',
+ 31 => '',
+ 32 => '',
+ 33 => '',
+ 34 => '',
+ 35 => '',
+ 36 => '',
+ 37 => '',
+ 38 => '',
+ 39 => '',
+ 40 => '',
+ 41 => '',
+ 42 => '',
+ 43 => '',
+ 44 => '',
+ 45 => '',
+ 46 => '',
+ 47 => '',
+ 48 => '',
+ 49 => '0/0/00',
+ 50 => '',
+ 51 => '',
+ 52 => '0/0/00',
+ 53 => '',
+ 54 => '',
+ 55 => '',
+ 56 => '',
+ 57 => '',
+ 58 => '',
+ 59 => '',
+ 60 => '',
+ 61 => '',
+ 62 => '',
+ 63 => '',
+ 64 => '',
+ 65 => '',
+ 66 => 'Unspecified',
+ 67 => '',
+ 68 => '',
+ 69 => '',
+ 70 => '',
+ 71 => '',
+ 72 => '',
+ 73 => '',
+ 74 => '',
+ 75 => '',
+ 76 => '',
+ 77 => '
+',
+ 78 => '',
+ 79 => '',
+ 80 => '',
+ 81 => 'Normal',
+ 82 => 'False',
+ 83 => '',
+ 84 => '',
+ 85 => 'Normal',
+ 86 => '',
+ 87 => '',
+ 88 => '',
+ 89 => '',
+ 90 => '',
+ 91 => '',
+ ),
+ ),
+ $this->readCsv('bug_6372.csv', array('length' => 92)));
+ }
+
+ public function testLineEndings()
+ {
+ foreach (array('simple_lf', 'simple_crlf', 'notrailing_lf', 'notrailing_crlf') as $test) {
+ $this->assertEquals(array (
+ 0 =>
+ array (
+ 0 => 'one',
+ 1 => 'two',
+ 2 => 'three',
+ ),
+ 1 =>
+ array (
+ 0 => 'four',
+ 1 => 'five',
+ 2 => 'six',
+ ),
+ ),
+ $this->readCsv($test . '.csv'));
+ }
+ }
+
+ public function testMultiLine()
+ {
+ $this->assertEquals(array (
+ 0 =>
+ array (
+ 0 => 'one',
+ 1 => 'two',
+ 2 => 'three
+four',
+ ),
+ 1 =>
+ array (
+ 0 => 'five',
+ 1 => 'six
+seven',
+ 2 => 'eight',
+ ),
+ 2 =>
+ array (
+ 0 => 'nine',
+ 1 => 'ten',
+ 2 => 'eleven
+twelve',
+ ),
+ 3 =>
+ array (
+ 0 => 'one',
+ 1 => 'two',
+ 2 => 'three
+ four',
+ ),
+ ),
+ $this->readCsv('multiline1.csv'));
+ }
+
+ public function testQuotes()
+ {
+ for ($i = 1; $i <= 2; $i++) {
+ $this->assertEquals(array (
+ 0 =>
+ array (
+ 0 => 'one',
+ 1 => 'two',
+ 2 => 'three',
+ ),
+ 1 =>
+ array (
+ 0 => 'four',
+ 1 => 'five six',
+ 2 => 'seven',
+ ),
+ ),
+ $this->readCsv('quote' . $i . '.csv'));
+ }
+
+ for ($i = 3; $i <= 5; $i++) {
+ $this->assertEquals(array (
+ 0 =>
+ array (
+ 0 => 'one two',
+ 1 => 'three, four',
+ 2 => 'five',
+ ),
+ 1 =>
+ array (
+ 0 => 'six',
+ 1 => 'seven ',
+ 2 => 'eight',
+ ),
+ ),
+ $this->readCsv('quote' . $i . '.csv'));
+ }
+ }
+}
--- /dev/null
+"Field 1-1", "Field 1-2", "Field 1-3", "Field 1-4"
+"Field 2-1", "Field 2-2", "Field 2-3"
+"Field 3-1", "Field 3-2"
+"Field 4-1"
--- /dev/null
+"Field 1-1", "Field 1-2", "Field 1-3", "Field 1-4"
+"Field 2-1", "Field 2-2", "Field 2-3", "Field 2-4", "Extra Field"
+"Field 3-1", "Field 3-2"
+"Field 4-1"
--- /dev/null
+"Field 1-1","Field 1-2","Field 1-3","Field 1-4"
+"Field 2-1","Field 2-2","Field 2-3","I'm multiline
+Field"
+"Field 3-1","Field 3-2","Field 3-3"
--- /dev/null
+"Field 1-1","Field 1-2","Field 1-3","Field 1-4"
+"Field 2-1","Field 2-2","Field 2-3","I'm multiline
+Field"
+"Field 3-1","Field 3-2","Field 3-3"
--- /dev/null
+"Field 1-1","Field 1-2","Field 1-3","Field 1-4"\r"Field 2-1","Field 2-2","Field 2-3","I'm multiline\rField"\r"Field 3-1","Field 3-2","Field 3-3"
\ No newline at end of file
--- /dev/null
+Subject~Start Date~Start Time~End Date~End Time~All day event~Reminder on/off~Reminder Date~Reminder Time~Category~Description~Priority
+"Inservice on new resource: ""CPNP Toolkit"""~2004-11-08~10:30 AM~2004-11-08~11:30 AM~FALSE~FALSE~~~Training~"CPN Program ...
+Inservice on new resource: ""CPNP Toolkit""
+
+<b>Registration Deadline: October 27, 2004, noon</b>
+
+<a href=""F041108A-Eval.pdf"" target=""_blank"">
+<img src=""acrobat.gif"" border=""0""></a> <a href=""F041108A-Eval.pdf"" target=""_blank""> Session Evaluation - Eligibility for Prize!</a>
+
+<a href=""F041108A-DI.pdf"" target=""_blank"">
+<img src=""acrobat.gif"" border=""0""></a> <a href=""F041108A-DI.pdf"" target=""_blank""> Dial In Numbers for Sites Registered</a>
+
+<a href=""F041108A.pdf"" target=""_blank"">
+<img src=""acrobat.gif"" border=""0""></a> <a href=""F041108A.pdf"" target=""_blank""> Poster and Registration Form</a>
+
+Facilitator: Manager
+
+preblurb preblurb preblurb preblurb preblurb preblurb preblurb preblurb preblurb ""CPNP Toolkit"". postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb .
+
+postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb postblurb
+
+Come check out the new resource!"~Normal
--- /dev/null
+"Betreff","Beginnt am","Beginnt um","Endet am","Endet um","Ganztägiges Ereignis","Erinnerung Ein/Aus","Erinnerung am","Erinnerung um","Besprechungsplanung","Erforderliche Teilnehmer","Optionale Teilnehmer","Besprechungsressourcen","Abrechnungsinformationen","Beschreibung","Kategorien","Ort","Priorität","Privat","Reisekilometer","Vertraulichkeit","Zeitspanne zeigen als"
+"Burger Download Session","2.5.2006","11:50:00","2.5.2006","13:00:00","Aus","Ein","2.5.2006","11:35:00","Haas, Jörg","Kuhl, Oliver",,,,"
+",,"Burger Upload Station (Burger King)","Normal","Aus",,"Normal","1"
--- /dev/null
+"Title","First Name","Middle Name","Last Name","Suffix","Company","Department","Job Title","Business Street","Business Street 2","Business Street 3","Business City","Business State","Business Postal Code","Business Country/Region","Home Street","Home Street 2","Home Street 3","Home City","Home State","Home Postal Code","Home Country/Region","Other Street","Other Street 2","Other Street 3","Other City","Other State","Other Postal Code","Other Country/Region","Assistant's Phone","Business Fax","Business Phone","Business Phone 2","Callback","Car Phone","Company Main Phone","Home Fax","Home Phone","Home Phone 2","ISDN","Mobile Phone","Other Fax","Other Phone","Pager","Primary Phone","Radio Phone","TTY/TDD Phone","Telex","Account","Anniversary","Assistant's Name","Billing Information","Birthday","Business Address PO Box","Categories","Children","Directory Server","E-mail Address","E-mail Type","E-mail Display Name","E-mail 2 Address","E-mail 2 Type","E-mail 2 Display Name","E-mail 3 Address","E-mail 3 Type","E-mail 3 Display Name","Gender","Government ID Number","Hobby","Home Address PO Box","Initials","Internet Free Busy","Keywords","Language","Location","Manager's Name","Mileage","Notes","Office Location","Organizational ID Number","Other Address PO Box","Priority","Private","Profession","Referred By","Sensitivity","Spouse","User 1","User 2","User 3","User 4","Web Page"
+"","John","","Smith","","International Inc","","","",,,"","","","","",,,"","","","","",,,"","","","","","(123) 555-1111","(123) 555-2222","","","","","","","","","(123) 555-3333","","","","","","","","","0/0/00","",,"0/0/00",,"Programming",,,"john@example.com","SMTP","John Smith (john@example.com)",,,,,,,"Unspecified","",,,"J.S.","","","","","",,"PHP
+Perl
+Python
+","","",,"Normal","False","",,"Normal","","","","","",""
--- /dev/null
+"Title","First Name","Middle Name","Last Name","Suffix","Company","Department","Job Title","Business Street","Business Street 2","Business Street 3","Business City","Business State","Business Postal Code","Business Country/Region","Home Street","Home Street 2","Home Street 3","Home City","Home State","Home Postal Code","Home Country/Region","Other Street","Other Street 2","Other Street 3","Other City","Other State","Other Postal Code","Other Country/Region","Assistant's Phone","Business Fax","Business Phone","Business Phone 2","Callback","Car Phone","Company Main Phone","Home Fax","Home Phone","Home Phone 2","ISDN","Mobile Phone","Other Fax","Other Phone","Pager","Primary Phone","Radio Phone","TTY/TDD Phone","Telex","Account","Anniversary","Assistant's Name","Billing Information","Birthday","Business Address PO Box","Categories","Children","Directory Server","E-mail Address","E-mail Type","E-mail Display Name","E-mail 2 Address","E-mail 2 Type","E-mail 2 Display Name","E-mail 3 Address","E-mail 3 Type","E-mail 3 Display Name","Gender","Government ID Number","Hobby","Home Address PO Box","Initials","Internet Free Busy","Keywords","Language","Location","Manager's Name","Mileage","Notes","Office Location","Organizational ID Number","Other Address PO Box","Priority","Private","Profession","Referred By","Sensitivity","Spouse","User 1","User 2","User 3","User 4","Web Page"
+"","","","","","","","","Big Tower'"", 1"" Floor
+123 Main Street",,,"","","","","",,,"","","","","",,,"","","","","","","","","","","","","","","","","","","","","","","","","0/0/00","",,"0/0/00",,,,,"","","",,,,,,,"Unspecified","",,,"","","","","","",,,"","",,"Normal","False","",,"Normal","","","","","",""
--- /dev/null
+"Title","First Name","Middle Name","Last Name","Suffix","Company","Department","Job Title","Business Street","Business Street 2","Business Street 3","Business City","Business State","Business Postal Code","Business Country/Region","Home Street","Home Street 2","Home Street 3","Home City","Home State","Home Postal Code","Home Country/Region","Other Street","Other Street 2","Other Street 3","Other City","Other State","Other Postal Code","Other Country/Region","Assistant's Phone","Business Fax","Business Phone","Business Phone 2","Callback","Car Phone","Company Main Phone","Home Fax","Home Phone","Home Phone 2","ISDN","Mobile Phone","Other Fax","Other Phone","Pager","Primary Phone","Radio Phone","TTY/TDD Phone","Telex","Account","Anniversary","Assistant's Name","Billing Information","Birthday","Business Address PO Box","Categories","Children","Directory Server","E-mail Address","E-mail Type","E-mail Display Name","E-mail 2 Address","E-mail 2 Type","E-mail 2 Display Name","E-mail 3 Address","E-mail 3 Type","E-mail 3 Display Name","Gender","Government ID Number","Hobby","Home Address PO Box","Initials","Internet Free Busy","Keywords","Language","Location","Manager's Name","Mileage","Notes","Office Location","Organizational ID Number","Other Address PO Box","Priority","Private","Profession","Referred By","Sensitivity","Spouse","User 1","User 2","User 3","User 4","Web Page"
+"","","","","","","","","123, 12th Floor,
+Main Street",,,"","","","","",,,"","","","","",,,"","","","","","","","","","","","","","","","","","","","","","","","","0/0/00","",,"0/0/00",,"",,,"","","","","","",,,,"Unspecified","",,,"","","","","","",,"
+","","",,"Normal","False","",,"Normal","","","","","",""
--- /dev/null
+one,two,three
+four,five
+six,seven,eight
+nine,ten,eleven,twelve
--- /dev/null
+"one","two","three"
+"four","five"
+"six","seven","eight"
+"nine","ten","eleven","twelve"
--- /dev/null
+"one","two","three
+four"
+"five","six
+seven","eight"
+"nine","ten","eleven
+twelve"
+"one","two","three
+ four"
--- /dev/null
+one,two,three
+four,five,six
--- /dev/null
+one,two,three
+four,five,six
--- /dev/null
+"one",two,"three"
+four,"five six",seven
--- /dev/null
+"one",two,"three"
+four,"five six",seven
--- /dev/null
+"one two","three, four",five
+six,"seven ",eight
--- /dev/null
+"one two","three, four",five
+six,"seven ",eight
--- /dev/null
+"one two","three, four","five"
+"six","seven ","eight"
--- /dev/null
+one,two,three\rfour,five,six
\ No newline at end of file
--- /dev/null
+one,two,three
+four,five,six
--- /dev/null
+one,two,three
+four,five,six