I tried to do: file_put_contents ( $file_name, utf8_encode($data) ) ; But when i check the file encoding from the shell with the linux command: 'file file_name' I get: 'file_name: ASCII text'
Does it mean that the utf8_encoding didn't worked? if so, what is the right way to convert from ASCII to UTF8