I have a git repository, html, js, php files mostly encoded in UTF-8. All of them should be encoded in UTF-8 but executing file -i * shows most of them are UTF-8 but some of them like this:
file.html.twig: text/plain; charset=us-ascii
Extrangely, if I open that files with Sublime text it shows UTF-8. And if I execute this conversion:
iconv -f us-ascii -t iso-8859-1 file.html.twig -o file2.html.twig
or
iconv -f utf-8 -t iso-8859-1 file.html.twig -o file2.html.twig
Nothing changes, while if I execute this command over an utf-8 file conversion is actually done.
Why does this happen? I know us-ascii is a subset of utf-8, but iconv seems unable to change this charset.
(My ultimate goal is to maintain a git repository with files in iso-8859-1, and git seems not to recognize file encoding, this will be a second problem, first I need to resolve this...)
thank you