简体   繁体   English

Eclipse中的编码问题错误地显示了其他编辑器中没有问题的UTF-8字符

[英]Encoding issue in Eclipse incorrectly displays UTF-8 characters that have no issue in other editors

I have a previously archived Eclipse project that I need to rebuild and publish because of a program error. 我有一个以前存档的Eclipse项目,由于程序错误,我需要重建和发布该项目。 Unfortunately, all of the french characters in my Java files (not ideal, I know) are shown as question marks. 不幸的是,我的Java文件中的所有法语字符(我知道不是很理想)都显示为问号。 This was not an issue when I was using Eclipse 2.x, but I recently upgraded to Eclipse 3.x. 当我使用Eclipse 2.x时,这不是问题,但是我最近升级到了Eclipse3.x。 All of the file encodings appear to be correct, and there is no problem with xml files, just .java source files. 所有文件编码似乎都是正确的,并且xml文件没有问题,只是.java源文件。 I'm using MacOS and the 64-bit version of eclipse. 我正在使用MacOS和64位版本的eclipse。 An image describing the problem is here . 描述问题的图像在这里

Thanks! 谢谢!

You will need to set a font for the text editor that supports the used UTF-8 characters. 您将需要为文本编辑器设置一种支持使用的UTF-8字符的字体。 Go to Window/Preferences/General/Appearance/Colors and Fonts and change the "Text" fonts in the category "Basic" to a font, that supports the french UTF-8 characters. 转到Window/Preferences/General/Appearance/Colors and Fonts然后将“基本”类别中的“文本”字体更改为支持法语UTF-8字符的字体。 To read the files in the Java editor you will have to do the same for the corresponding fonts under the category "Java". 要在Java编辑器中读取文件,您必须对“ Java”类别下的相应字体执行相同的操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM