Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 14:28 Go to next message
Nicolas Blouin is currently offline Nicolas BlouinFriend
Messages: 2
Registered: June 2012
Junior Member
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 18:37 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3478
Registered: July 2009
Senior Member

Open the file's Properties dialog from the Navigator or Project/Package/Script Explorer view. It should be on the Resources page.

Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Get Encoding of a file in Eclipse [message #890178 is a reply to message #890040] Thu, 21 June 2012 11:32 Go to previous messageGo to next message
Nicolas Blouin is currently offline Nicolas BlouinFriend
Messages: 2
Registered: June 2012
Junior Member
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 12:08 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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 16:02 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3478
Registered: July 2009
Senior Member

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.

Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Get Encoding of a file in Eclipse [message #1740972 is a reply to message #890259] Mon, 22 August 2016 00:39 Go to previous message
Shinji Kashihara is currently offline Shinji KashiharaFriend
Messages: 1
Registered: July 2009
Junior Member
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: Sun Aug 25 04:40:57 GMT 2019

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

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

Back to the top