I have this problem with my CSS files getting broken encoding every time I make modifications on it on the shared folder in my host, where the shared folder is directly served by the VM’s HTTPD server (Apache). A quick search reveals that this is an issue with Apache.
According to StackOverflow question, the issue is caused by Apache’s default configuration when dealing with mounted filesystems and serving them as static files.
The solution is to turn
EnableSendfile off in your httpd.conf. Open
httpd.conf and look for the option
EnableSendfile. Set the value to
off. Sometimes, it is commented out and the default value is
on for some versions. Remove the comment then set it to off.