modifs.mineures sans commentaires

This commit is contained in:
Jephté Clain 2024-10-03 09:50:24 +04:00
parent 07c927f34a
commit a76f820fa6
3 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;
}

View 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");