 <pre><code>$sql = "SELECT * FROM my_table"; $ressource_sql = execute_sql($sql); while ($row = mysql_fetch_assoc($ressource_sql)) { $ligne_hve.=$row['id'] . ';'; $ligne_hve.= iconv(input charset, 'windows-1252//TRANSLIT', $row['name']) . ';'; $ligne_hve.= iconv(input charset, 'windows-1252//TRANSLIT', $row['products']) . ';'; $ligne_hve .= "\n"; } $file_hve = fopen($file_export_hve, "w+"); fwrite($file_hve, $ligne_hve); fclose($file_hve); </code></pre> <p>The input charset is iso-8859-1.</p>