Re: Problème de charset sur text/csv

Matthieu Marcillaud <[email protected]>
Newsgroups gmane.comp.web.spip.devel
Message-ID <[email protected]>
Le 06/02/2017 à 20:07, Cédric Morin a écrit :
> Hello,
>
> le format CSV est un format plein texte qui n'inclue pas de déclaration
> de charset.
>
> Du coup il n'y a aucun moyen d'être sûr du charset source d'un fichier
> CSV, et d'avoir un affichage propre.

Ah tiens, c'est rigolo, j'ai eu un CSV la semaine dernière pareil en 
charset window-bidule… c'est pour ça que j'ai modifié légèrement la 
fonction de bonux :p

$importer_csv = charger_fonction('importer_csv', 'inc');
$liste = $importer_csv($csv, true, ';', '"', 10000, 'windows-1252');

L'ennui c'est que c'est pas automatique donc.

MM.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.