Skip to main content



      Home
Home » Newcomers » Newcomers » Get Encoding of a file in Eclipse
icon1.gif  Get Encoding of a file in Eclipse [message #890004] Wed, 20 June 2012 10:28 Go to next message
Eclipse UserFriend
I may be missing something here, but I cannot find a place in Eclipse that tells me the encoding of a file that is currently open. I am opening a UTF-8 encoded file, but nowhere am I seeing this confirmed.

In editors such as Notepad++ and EditPlus, it possible to see this information.

The closest I've come in Eclipse is with a plugin called File Encoding Info 1.1.2, which, by its own admission, "will try to detect the encoding of the current editing text file". Unfortunately, it is not very successful in my case. It is 34% confident that the file is ISO-8859-1, and only 10% confident that it is UTF-8.

Ideally, I would need Eclipse to detect the encoding of a file when I open it and keep it as such when I save it.

Can anyone help?
Re: Get Encoding of a file in Eclipse [message #890040 is a reply to message #890004] Wed, 20 June 2012 14:37 Go to previous messageGo to next message
Eclipse UserFriend
Open the file's Properties dialog from the Navigator or Project/Package/Script Explorer view. It should be on the Resources page.
Re: Get Encoding of a file in Eclipse [message #890178 is a reply to message #890040] Thu, 21 June 2012 07:32 Go to previous messageGo to next message
Eclipse UserFriend
Nitin Dahyabhai wrote on Wed, 20 June 2012 14:37
Open the file's Properties dialog from the Navigator or Project/Package/Script Explorer view. It should be on the Resources page.


That's the first place I checked, but is says "Default (inherited from container: Cp1252), which is inaccurate since the file is UTF-8.
Re: Get Encoding of a file in Eclipse [message #890190 is a reply to message #890178] Thu, 21 June 2012 08:08 Go to previous messageGo to next message
Eclipse UserFriend
On 21.06.2012 13:32, Nicolas Blouin wrote:
> Nitin Dahyabhai wrote on Wed, 20 June 2012 14:37
>> Open the file's Properties dialog from the Navigator or
>> Project/Package/Script Explorer view. It should be on the Resources
>> page.
>
>
> That's the first place I checked, but is says "Default (inherited from
> container: Cp1252), which is inaccurate since the file is UTF-8.
There is no auto-detection of the encoding (except for the BOMs).

Dani
Re: Get Encoding of a file in Eclipse [message #890259 is a reply to message #890190] Thu, 21 June 2012 12:02 Go to previous messageGo to next message
Eclipse UserFriend
Well, there is, but only for the file types that have a way of declaring their encoding in the file itself, e.g. XML, HTML, JSP, DTD, and CSS files--if you have the right plug-ins installed. For most file types, though, it is as Dani said.
Re: Get Encoding of a file in Eclipse [message #1740972 is a reply to message #890259] Sun, 21 August 2016 20:39 Go to previous message
Eclipse UserFriend
Try the Autodetect Encoding plugin.

'Autodetect: Set Automatically'
This only applies if the file properties encoding is not specified.
An automatically set is not enabled by default.
Previous Topic:Two or one eclipse
Next Topic:export project from eclipse to GITLAB
Goto Forum:
  


Current Time: Wed Jul 23 14:33:41 EDT 2025

Powered by FUDForum. Page generated in 0.08856 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top