mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82049f1701 | ||
|
|
72fde0424d |
192
ChangeLog.txt
192
ChangeLog.txt
@@ -1,91 +1,101 @@
|
|||||||
parseCSV 0.2.0 beta
|
parseCSV 0.2.1
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
Date: 2-Jan-2007
|
Date: 8-Aug-2007
|
||||||
|
|
||||||
- Added auto() function to automatically detect
|
- Fixed stupid code which caused auto function
|
||||||
delimiter character.
|
to not work in some situations.
|
||||||
Useful for user upload incase delimiter is
|
|
||||||
comma (,), tab, or semi-colon (;). Some
|
-----------------------------------
|
||||||
versions of MS Excel for Windows use
|
|
||||||
semi-colons instead of commas when saving to
|
|
||||||
CSV files.
|
parseCSV 0.2.0 beta
|
||||||
It uses a process of elimination to eliminate
|
-----------------------------------
|
||||||
characters that can not be the delimiter,
|
Date: 2-Jan-2007
|
||||||
so it should work on all CSV-structured files
|
|
||||||
almost no matter what the delimiter is.
|
- Added auto() function to automatically detect
|
||||||
|
delimiter character.
|
||||||
- Generally updated some of the core workings
|
Useful for user upload incase delimiter is
|
||||||
to increase performance, and offer better
|
comma (,), tab, or semi-colon (;). Some
|
||||||
support for large (1MB and up) files.
|
versions of MS Excel for Windows use
|
||||||
|
semi-colons instead of commas when saving to
|
||||||
- Added code examples to header comment.
|
CSV files.
|
||||||
|
It uses a process of elimination to eliminate
|
||||||
-----------------------------------
|
characters that can not be the delimiter,
|
||||||
|
so it should work on all CSV-structured files
|
||||||
|
almost no matter what the delimiter is.
|
||||||
parseCSV 0.1.6 beta
|
|
||||||
-----------------------------------
|
- Generally updated some of the core workings
|
||||||
Date: 22-Dec-2006
|
to increase performance, and offer better
|
||||||
|
support for large (1MB and up) files.
|
||||||
- Updated output() function.
|
|
||||||
|
- Added code examples to header comment.
|
||||||
-----------------------------------
|
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
parseCSV 0.1.5 beta
|
|
||||||
-----------------------------------
|
parseCSV 0.1.6 beta
|
||||||
Date: 22-Dec-2006
|
-----------------------------------
|
||||||
|
Date: 22-Dec-2006
|
||||||
- Added output() function for easy output to
|
|
||||||
browser, for downloading features for example.
|
- Updated output() function.
|
||||||
|
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
|
|
||||||
parseCSV 0.1.4 beta
|
parseCSV 0.1.5 beta
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
Date: 17-Dec-2006
|
Date: 22-Dec-2006
|
||||||
|
|
||||||
- Minor changes and fixes
|
- Added output() function for easy output to
|
||||||
|
browser, for downloading features for example.
|
||||||
-----------------------------------
|
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
parseCSV 0.1.3 beta
|
|
||||||
-----------------------------------
|
parseCSV 0.1.4 beta
|
||||||
Date: 17-Dec-2006
|
-----------------------------------
|
||||||
|
Date: 17-Dec-2006
|
||||||
- Added GPL v2.0 license.
|
|
||||||
|
- Minor changes and fixes
|
||||||
-----------------------------------
|
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
parseCSV 0.1.2 beta
|
|
||||||
-----------------------------------
|
parseCSV 0.1.3 beta
|
||||||
Date: 17-Dec-2006
|
-----------------------------------
|
||||||
|
Date: 17-Dec-2006
|
||||||
- Added encoding() function for easier character
|
|
||||||
encoding configuration.
|
- Added GPL v2.0 license.
|
||||||
|
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
|
|
||||||
parseCSV 0.1.1 beta
|
parseCSV 0.1.2 beta
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
Date: 24-Nov-2006
|
Date: 17-Dec-2006
|
||||||
|
|
||||||
- Added support for a PHP die command on first
|
- Added encoding() function for easier character
|
||||||
line of csv files if they have a .php extension
|
encoding configuration.
|
||||||
to protect secure data from being displayed
|
|
||||||
directly to the browser.
|
-----------------------------------
|
||||||
|
|
||||||
-----------------------------------
|
|
||||||
|
parseCSV 0.1.1 beta
|
||||||
|
-----------------------------------
|
||||||
parseCSV 0.1 beta
|
Date: 24-Nov-2006
|
||||||
-----------------------------------
|
|
||||||
Date: 23-Nov-2006
|
- Added support for a PHP die command on first
|
||||||
|
line of csv files if they have a .php extension
|
||||||
- Initial release
|
to protect secure data from being displayed
|
||||||
|
directly to the browser.
|
||||||
-----------------------------------
|
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
parseCSV 0.1 beta
|
||||||
|
-----------------------------------
|
||||||
|
Date: 23-Nov-2006
|
||||||
|
|
||||||
|
- Initial release
|
||||||
|
|
||||||
|
-----------------------------------
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ class parseCSV {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Class: parseCSV v0.2.0 beta
|
Class: parseCSV v0.2.1
|
||||||
http://code.google.com/p/parsecsv-for-php/
|
http://code.google.com/p/parsecsv-for-php/
|
||||||
|
|
||||||
Created by Jim Myhrberg (jim@zydev.info).
|
Created by Jim Myhrberg (jim@zydev.info).
|
||||||
@@ -230,10 +230,12 @@ class parseCSV {
|
|||||||
|
|
||||||
if ( $prefered === null ) $prefered = $this->auto_prefered;
|
if ( $prefered === null ) $prefered = $this->auto_prefered;
|
||||||
|
|
||||||
if ( empty($data) ) {
|
if ( empty($this->file_data) ) {
|
||||||
if ( $this->check_data() ) {
|
if ( $this->check_data($file) ) {
|
||||||
$data = &$this->file_data;
|
$data = &$this->file_data;
|
||||||
} else return false;
|
} else return false;
|
||||||
|
} else {
|
||||||
|
$data = &$this->file_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
$chars = array();
|
$chars = array();
|
||||||
@@ -324,7 +326,7 @@ class parseCSV {
|
|||||||
$data = ltrim($strip[1]);
|
$data = ltrim($strip[1]);
|
||||||
}
|
}
|
||||||
if ( $this->convert_encoding ) $data = iconv($this->input_encoding, $this->output_encoding, $data);
|
if ( $this->convert_encoding ) $data = iconv($this->input_encoding, $this->output_encoding, $data);
|
||||||
if ( $data[strlen($data)-1] != "\n" ) $data .= "\n";
|
if ( substr($data, -1) != "\n" ) $data .= "\n";
|
||||||
$this->file_data = &$data;
|
$this->file_data = &$data;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user