在Eclipse屏幕中另存为UTF 8错误.为什么程序没有运行? [英] Save as UTF 8 error in Eclipse screen. Why the program is not running?

查看:82
本文介绍了在Eclipse屏幕中另存为UTF 8错误.为什么程序没有运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时我会在Eclipse中看到一个弹出窗口,该弹出窗口未在我的代码中运行.我想知道如何解决此错误?如何摆脱此错误

解决方案

您似乎有一些Unicode字符,这些字符无法保存为默认文件编码,因为您的默认字符(例如ANSI)可能无法表示那个角色.例如.ANSI中无法表示阿拉伯语,北印度语,乌尔都语甚至是表情符号中的字符,因此您需要将文件编码更改为UTF-8,之后才能成功保存文件内容并运行程序.

要解决此问题,

  1. 单击Windows菜单
  2. 选择首选项
  3. 单击以展开常规
  4. 单击工作区
  5. 在左下角,您会看到文本文件编码"
  6. 默认情况下,它可能是CP1252,因此只需将其更改为UTF-8
  7. 然后,您应该可以轻松保存和运行程序.

如果您遇到任何问题,请告诉我.

Sometimes I see a pop appears in Eclipse, which is not run in my code. I wanted to know how to fix this error?. How do I get rid of this error

解决方案

You seem to be having some Unicode characters, which can't be saved in your default file encoding as your default (e.g. ANSI) might not be able to represent that character. E.g. Characters from Arabic, Hindi, Urdu or even emojis can't be represented in ANSI due to which you need to change the file encoding to UTF-8 after which you will be able to save your file contents successfully and run your program.

For solving this problem,

  1. click on Windows menu
  2. Select Preferences
  3. Expand General by clicking it
  4. Click on Workspace
  5. There in bottom left you will see 'Text file encoding'
  6. By default it might be CP1252, so just change it to UTF-8
  7. Then you should have no problems saving and running your program.

Let me know if you face any issues.

这篇关于在Eclipse屏幕中另存为UTF 8错误.为什么程序没有运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆