I have a file in charset US-ASCII and want to encode it in UTF-8.
> file -i from.php
from.php: text/x-php; charset=us-ascii
I type this command :
> sudo -u www-data iconv -f US-ASCII -t UTF8 from.php > to.php
The file to.php is created but with the wrong charset.
> file -i to.php
to.php: text/x-php; charset=us-ascii
I checked the iconv list of charset and US-ASCII and UTF8 seem to be well writen.
This command doesn't work any better :
sudo -u www-data iconv -f US-ASCII -t UTF8 -o to.php from.php