Eclipse和MyEclipse中文显示乱码问号非正常显示
-
打开Eclipse或者MyEclipse
Windows -> Preferences
-
General -> Content type
Java Class File
Text目录下
CSS
HTML
Java Properties File
Java Source File
JavaScript Source File
JSP
Refactoring History File
Refactoring History Index
XML
XML(illformed)
以上项目的Default encoding都改为UTF-8 并点击 Update
-
General -> Workspace
Text file encoding更改为Other:UTF-8
点击Apply OK
-
在自己开发的一个项目上点击右键
项目右键->Properties 或者 左键点击->Alt+Enter
-
Resource
Text file encoding 选择 Other:UTF-8
Apply OK
-
重启Eclipse
经过上述5个步骤,Eclipse的中文编码便设置完毕.
如数据库中中文还是显示问号及其乱码
请检查数据库设置
代码
过滤器
转载自百度https://jingyan.baidu.com/article/48206aeaa54c62216ad6b399.html