eclipse中设置编码有关问题
eclipse中设置编码问题在eclipse中设置编码有:1.project-properties-resource2.window-preferences-ge
eclipse中设置编码问题
在eclipse中设置编码有:
1.project->properties->resource
2.window->preferences->general->workspace
3.Run ->run configurations->common
还有就是window->preferences->general->content types也可以设置。
他们间的区别于联系
如果用
Java codeSystem.getProperty("file.encoding")
得到的得到的是哪里设置的编码方式?与系统的编码有什么联系?
[解决办法]1.project->properties->resource
设置你当前选定的工程的编码,只针对当前一个工程
2.window->preferences->general->workspace
设置你当前的workspace里所有工程的编码,针对这个workspace里的所有工程
3.Run ->run configurations->common
设置的是你运行时的编码,也就是你控制台显示时的编码
4.还有就是window->preferences->general->content types也可以设置。
这个是设定你的某一类文件的指定编码集,对整个workspace都起作用。
System.getProperty("file.encoding")
是你当前机器的操作系统的编码