VS Code, copyright symbol © shown as � and saved as � or �

六月ゝ 毕业季﹏ 提交于 2019-12-12 15:06:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!