Cyrillic symbols in Eclipse

前提是你 提交于 2019-12-10 23:30:01

问题


I am writing a Java program with a GUI that will have Cyrillic text in some labels. When I create label JLabel lbl = new JLabel("Име на обект"); everything is fine and when my program starts it is also properly displayed. But I changed the PC I was working on and copied my project to my home PC. On that system, all Cyrillic text in my code now looks like JLabel lbl = new JLabel("РћС‚ Дата:*"); and is displayed in the same way when the program runs. How can I make Eclipse show my Cyrillic text normal again?


回答1:


i have the same issue :)

Delete the file. Copy the same file again. Don't open the file. Right Click on the file --> Properties. Resource --> Text file encoding --> check "Other" with UTF-8. Open the file.



来源:https://stackoverflow.com/questions/25370429/cyrillic-symbols-in-eclipse

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