问题
In my html source code I have some special symbols like the copyright one <meta content="© Copyright... />
For some text editors these are shown correctly as above, but on VS Code I see it as � and after I save the file, the symbol will be shown as � and � on other editors.
If I explicitly paste the © on VS Code and save it, then on another text editor it will be saved as ©.
How can I solve this? What should I do?
回答1:
Ensure your file's encoding is set to something which can accurately display the symbol (like UTF-8):
This can be found in the bottom right of the program in the status bar.
See their documentation on File Encoding Support.
回答2:
I've found out that the files were saved in ISO-8859-1 encoding, that caused to see like that the symbols even If I had UTF8 set as my default.
回答3:
Same problem here - solved by setting "files.encoding": "windows1252"
for this workspace.
回答4:
Try use HTML codes for special symbols: http://www.ascii.cl/htmlcodes.htm
来源:https://stackoverflow.com/questions/39764789/vs-code-copyright-symbol-shown-as-and-saved-as-%c3%af-%c2%bd-or