diff --git a/README.md b/README.md index a9f84c86..31a8ae1e 100644 --- a/README.md +++ b/README.md @@ -50,22 +50,14 @@ Contribute to this documentation in the [sculpin branch](https://github.com/thep * When creating a file using the library, first insert all the data that need to be inserted before starting manipulating the CSV. If you manipulate your data before insertion, you may change the file cursor position and get unexpected results. -* If you are dealing with non-unicode data, specify the encoding parameter using the `setEncoding` method otherwise your output conversions may no work. - -* If you have your LC_CTYPE set to a locale that's using UTF-8 and you try to parse a file that's not in UTF-8, PHP will cut your fields the moment it encounters a byte it can't understand (i.e. any outside of ASCII that doesn't happen to be part of a UTF-8 character which it likely isn't). [This gist will show you a possible solution](https://gist.github.com/pilif/9137146) to this problem by using [PHP stream filter](http://www.php.net/manual/en/stream.filters.php). This tip is from [Philip Hofstetter](https://github.com/pilif) - * When merging multiples CSV documents don't forget to set the main CSV object as a `League\Csv\Writer` object with the `$open_mode = 'a+'` to preserve its content. This setting is of course not required when your main `League\Csv\Writer` object is created from String -* **If you are on a Mac OS X Server**, add the following lines before using the library to help [PHP detect line ending in Mac OS X](http://php.net/manual/en/function.fgetcsv.php#refsect1-function.fgetcsv-returnvalues). +* If you are dealing with non-unicode data, specify the encoding parameter using the `setEncoding` method otherwise your output conversions may no work. -```php -if (! ini_get("auto_detect_line_endings")) { - ini_set("auto_detect_line_endings", true); -} -``` +* If you have your LC_CTYPE set to a locale that's using UTF-8 and you try to parse a file that's not in UTF-8, PHP will cut your fields the moment it encounters a byte it can't understand (i.e. any outside of ASCII that doesn't happen to be part of a UTF-8 character which it likely isn't). [This gist will show you a possible solution](https://gist.github.com/pilif/9137146) to this problem by using [PHP stream filter](http://www.php.net/manual/en/stream.filters.php). This tip is from [Philip Hofstetter](https://github.com/pilif) Testing ------- diff --git a/src/AbstractCsv.php b/src/AbstractCsv.php index 7d1ee8d2..a7dc8e48 100644 --- a/src/AbstractCsv.php +++ b/src/AbstractCsv.php @@ -6,7 +6,7 @@ * @copyright 2014 Ignace Nyamagana Butera * @link https://github.com/nyamsprod/League.csv * @license http://opensource.org/licenses/MIT -* @version 5.2.0 +* @version 5.3.0 * @package League.csv * * MIT LICENSE diff --git a/src/ConverterTrait.php b/src/ConverterTrait.php index a870dc89..0c2cbb5f 100644 --- a/src/ConverterTrait.php +++ b/src/ConverterTrait.php @@ -6,7 +6,7 @@ * @copyright 2014 Ignace Nyamagana Butera * @link https://github.com/nyamsprod/League.csv * @license http://opensource.org/licenses/MIT -* @version 5.2.0 +* @version 5.3.0 * @package League.csv * * MIT LICENSE diff --git a/src/Iterator/IteratorFilter.php b/src/Iterator/IteratorFilter.php index 91742061..69da87b8 100644 --- a/src/Iterator/IteratorFilter.php +++ b/src/Iterator/IteratorFilter.php @@ -6,7 +6,7 @@ * @copyright 2014 Ignace Nyamagana Butera * @link https://github.com/nyamsprod/League.csv * @license http://opensource.org/licenses/MIT -* @version 5.2.0 +* @version 5.3.0 * @package League.csv * * MIT LICENSE diff --git a/src/Iterator/IteratorInterval.php b/src/Iterator/IteratorInterval.php index b5c05a0d..fcf93bba 100644 --- a/src/Iterator/IteratorInterval.php +++ b/src/Iterator/IteratorInterval.php @@ -6,7 +6,7 @@ * @copyright 2014 Ignace Nyamagana Butera * @link https://github.com/nyamsprod/League.csv * @license http://opensource.org/licenses/MIT -* @version 5.2.0 +* @version 5.3.0 * @package League.csv * * MIT LICENSE diff --git a/src/Iterator/IteratorQuery.php b/src/Iterator/IteratorQuery.php index 3f7b52d5..357336ce 100644 --- a/src/Iterator/IteratorQuery.php +++ b/src/Iterator/IteratorQuery.php @@ -6,7 +6,7 @@ * @copyright 2014 Ignace Nyamagana Butera * @link https://github.com/nyamsprod/League.csv * @license http://opensource.org/licenses/MIT -* @version 5.2.0 +* @version 5.3.0 * @package League.csv * * MIT LICENSE diff --git a/src/Iterator/IteratorSortBy.php b/src/Iterator/IteratorSortBy.php index c5d2897a..cb97d534 100644 --- a/src/Iterator/IteratorSortBy.php +++ b/src/Iterator/IteratorSortBy.php @@ -6,7 +6,7 @@ * @copyright 2014 Ignace Nyamagana Butera * @link https://github.com/nyamsprod/League.csv * @license http://opensource.org/licenses/MIT -* @version 5.2.0 +* @version 5.3.0 * @package League.csv * * MIT LICENSE diff --git a/src/Iterator/MapIterator.php b/src/Iterator/MapIterator.php index 35140de8..f31ee3a6 100644 --- a/src/Iterator/MapIterator.php +++ b/src/Iterator/MapIterator.php @@ -6,7 +6,7 @@ * @copyright 2014 Ignace Nyamagana Butera * @link https://github.com/nyamsprod/League.csv * @license http://opensource.org/licenses/MIT -* @version 5.2.0 +* @version 5.3.0 * @package League.csv * * MIT LICENSE diff --git a/src/Reader.php b/src/Reader.php index de7e10d5..a66c2477 100644 --- a/src/Reader.php +++ b/src/Reader.php @@ -6,7 +6,7 @@ * @copyright 2014 Ignace Nyamagana Butera * @link https://github.com/nyamsprod/League.csv * @license http://opensource.org/licenses/MIT -* @version 5.2.0 +* @version 5.3.0 * @package League.csv * * MIT LICENSE diff --git a/src/Writer.php b/src/Writer.php index bc96607b..9a2765ff 100644 --- a/src/Writer.php +++ b/src/Writer.php @@ -6,7 +6,7 @@ * @copyright 2014 Ignace Nyamagana Butera * @link https://github.com/nyamsprod/League.csv * @license http://opensource.org/licenses/MIT -* @version 5.2.0 +* @version 5.3.0 * @package League.csv * * MIT LICENSE