Home > Article > Development Tools > What to do if opening cpp with vscode displays garbled characters
What should I do if the cpp displayed with vscode displays garbled characters?
The default encoding of vscode is UTF-8, when the opened file is not UTF-8 encoded Garbled characters will appear.
The solution is as follows:
Method 1: Click the encoding button in the lower right corner (UTF-8 in the picture), and then select Operation, Reopen with Encoding, search GB 2312.
Method 2: Click File->Preferences->Settings, and then enter user settings on the right: "files.autoGuessEncoding": true,
Recommended related articles and tutorials:The above is the detailed content of What to do if opening cpp with vscode displays garbled characters. For more information, please follow other related articles on the PHP Chinese website!