'How to fix unsupported text encoding in VS code

I have imported a folder of a web project and I was not able to run it due to this error in some files“the file is not displayed in the editor because it is either binary or uses an unsupported text encoding” , I am using mac



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source