解决 eclipse 导入项目后 Html 文件中文乱码问题
几年前,刚毕业不久,接触到 eclipse for JavaEE 开发工具,当时不知道默认编码为 GBK,或者是 ISO-8859-1。
解决 eclipse 导入项目后 Html 文件中文乱码问题,修改字符编码,主要是修改 html 文件的编码。
修改 workspace 的默认编码
- 依次找到:windows->General->Workspace
- 全局生效:将 Text file encoding 的 other 选项改为 UTF-8
修改 Resource 默认字符编码
- 单项目生效:右键项目找到 Text file encoding
- 将 other 选项改为 UTF-8
解决方案
依次找到路径:
- windows->perferences->General->Content Types->Text->HTML
- 然后将 Default encoding 设置为 UTF-8 即可。
最后,希望对你的工作和学习有所帮助哟!
——END——
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick Start
Create a new post
1 | $ hexo new "My New Post" |
More info: Writing
Run server
1 | $ hexo server |
More info: Server
Generate static files
1 | $ hexo generate |