Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Eclipse Configuration(JRE default character set.)
Eclipse Configuration [message #1769713] Wed, 02 August 2017 20:30 Go to next message
Daniel Piche is currently offline Daniel PicheFriend
Messages: 4
Registered: August 2017
Junior Member
In my understanding, the JRE default character set can be defined in the 'run configurations' under TAB 'Common' :

Encoding (*) Default - inherited (UTF-8) ....

Question: It is inherited from where???

In my Indigo version the inherited default was cp1252, in Mars it was UTF-8 and in Oxygen it's back to cp1252 again!!!
  • Attachment: Eclipse.JPG
    (Size: 41.16KB, Downloaded 75 times)
Re: Eclipse Configuration [message #1769735 is a reply to message #1769713] Thu, 03 August 2017 04:29 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30894
Registered: July 2009
Senior Member
It's inherited from Window -> Preferences -> General -> Workspace where there is a "Text file encoding" option.
Re: Eclipse Configuration [message #1769799 is a reply to message #1769735] Thu, 03 August 2017 13:36 Go to previous messageGo to next message
Daniel Piche is currently offline Daniel PicheFriend
Messages: 4
Registered: August 2017
Junior Member
Thank you, it does indeed. But this bring a new question!

What does java.io.FileReader class use as encoding/decoding character set?

In my understanding, this class is using java.nio.Charset.defaultCharset() as decoding charset.
From documentation, this default charset represent the JMV default charset.
So, I've used the 'file.encoding' JVM property to change the default and it's working perfectly.
The java.io.FileReader class behave as expected respecting the selected encoding.

But, strangly, the run configuration encoding (which is inherit from Workspace) doesn't change the JMV default charset.
The FileReader class doesn't behave as expected. To modify the JVM charset, I must set the 'file.encoding' property.

This bring a new question!

I'm running three version of Eclipse on the same PC.
- My Indigo version set the JMV charset to cp1252.
- My Mars version set the JMV charser to UTF-8.
- My Oxygen version set the JMV charset to cp1252.

When you launch a Java application from Eclipse, how does the JVM charset is set? It that controllable?


PS: I'm aware of the InputStreamReader class where you can control the encoding scheme.
Re: Eclipse Configuration [message #1769806 is a reply to message #1769799] Thu, 03 August 2017 14:09 Go to previous messageGo to next message
Daniel Piche is currently offline Daniel PicheFriend
Messages: 4
Registered: August 2017
Junior Member
OK, subject close...

It seem that the Eclipse Mars 2.0 version got a bug (at least in my version).
The run configuration doesn't inherit from Workspace and nether change the JMV encoding.

I was able to change the JMV encoding with the Workspace setting in Oxygen.

Thanks anyway.
Re: Eclipse Configuration [message #1769895 is a reply to message #1769806] Fri, 04 August 2017 18:25 Go to previous message
Daniel Piche is currently offline Daniel PicheFriend
Messages: 4
Registered: August 2017
Junior Member
Still some problem with Eclipse and Encoding.
I've posted a bug report with Bugzilla.
Bug 520584

[Updated on: Tue, 08 August 2017 12:08]

Report message to a moderator

Previous Topic:Open Images with Quantum DB Eclipse Plugin
Next Topic:Glassfish plugging trouble. Versions not matching.
Goto Forum:
  


Current Time: Thu Feb 20 16:44:37 GMT 2020

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

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

Back to the top