Change text encoding for multiple files at once in Eclipse

后端 未结 3 1452
一个人的身影
一个人的身影 2021-01-04 10:04

I have some UTF-8 HTML templates in my Eclipse project and Eclipse keeps treating them as if they had a different encoding. It says the encoding is \"determined from content

相关标签:
3条回答
  • 2021-01-04 10:47

    I've only seen "determined from content" for XML files. In that case it's the only correct setting, because XML files have their encoding defined in their header, so forcing anything else would be a grave mistake.

    If you still want to do it, you could try to view the file .settings/org.eclipse.core.resources.prefs in your project (that file may or may not exist dependin on wether you've manually set any encoding in the project or not).

    0 讨论(0)
  • 2021-01-04 10:54

    I've just solved this problem (eclipse 3.5.2)

    Two steps required:

    1. Change text file encoding on the folder property page(.setting/org.eclipse.core.resources.prefs file has been created in my project)
    2. Change default encoding on *.html file content type on the Preference page General/Content Types
    0 讨论(0)
  • 2021-01-04 11:09

    This was caused by a development version of Eclipse. In the latest official release (3.5) it is fixed.

    0 讨论(0)
提交回复
热议问题