I am not able to generate a .txt file where the tilde and accents are printed correctly. I'm using fwrite
.
code snippet:
$arquivo = fopen('aaa.txt', 'w+');
$escrever = fwrite($arquivo, $txt);
fclose($arquivo);
I am not able to generate a .txt file where the tilde and accents are printed correctly. I'm using fwrite
.
code snippet:
$arquivo = fopen('aaa.txt', 'w+');
$escrever = fwrite($arquivo, $txt);
fclose($arquivo);
I solved it! The problem was to switch to mysqli_set_charset ($ connection, 'iso-8859-1'); in connection with the database! Simple and basic thing that took my time.