Parcourir la source

Better handling of unexpected/invalid characters in an UTF-8 file.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@880 a333f486-631f-4898-b8df-5754b55c2be0
dflaven il y a 14 ans
Parent
commit
9f36e2fb07
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      pages/csvimport.php

+ 1 - 1
pages/csvimport.php

@@ -835,7 +835,7 @@ EOF
 		// Compute a subset of the data set, now that we know the charset
 		if ($sEncoding == 'UTF-8')
 		{
-			$sUTF8Data = $sCSVData;		
+			$sUTF8Data = iconv('UTF-8', 'UTF-8//IGNORE//TRANSLIT', $sCSVData);
 		}
 		else
 		{