modifs.mineures sans commentaires
This commit is contained in:
parent
07c927f34a
commit
a76f820fa6
|
@ -2,7 +2,6 @@
|
|||
namespace nur\sery\ext;
|
||||
|
||||
use Exception;
|
||||
use nur\sery\cl;
|
||||
use nur\sery\ext\json\JsonException;
|
||||
use nur\sery\file;
|
||||
use nur\sery\os\IOException;
|
||||
|
|
|
@ -12,7 +12,7 @@ use nur\sery\file\TmpfileWriter;
|
|||
* Class file: outils pour gérer les fichiers
|
||||
*/
|
||||
class file {
|
||||
private static function fix_dash($file) {
|
||||
static function fix_dash($file) {
|
||||
if ($file === "-") $file = null;
|
||||
return $file;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
namespace nur\sery\file\csv;
|
||||
|
||||
use nur\sery\file;
|
||||
use nur\sery\file\FileReader;
|
||||
|
||||
class CsvReader extends AbstractReader {
|
||||
|
@ -17,7 +18,7 @@ class CsvReader extends AbstractReader {
|
|||
protected ?string $inputEncoding;
|
||||
|
||||
function getIterator() {
|
||||
$reader = new FileReader($this->input);
|
||||
$reader = new FileReader(file::fix_dash($this->input));
|
||||
$inputEncoding = $this->inputEncoding;
|
||||
if ($inputEncoding !== null) {
|
||||
$reader->appendFilter("convert.iconv.$inputEncoding.utf-8");
|
||||
|
|
Loading…
Reference in New Issue