First open the user settings, enter encoding in the search box, and then check the Auto Guess Encoding option, as shown in the picture:
##In this way, the encoding of the file can be automatically identified. When you open a file with Chinese characters encoded in GBK and UTF8, you don't need to manually switch the encoding.The above is the detailed content of How to set vscode to automatically recognize the encoding format. For more information, please follow other related articles on the PHP Chinese website!