Community
Participate
Working Groups
Build Identifier: I20110412-2200 OS: Mac OS X Java environment:1.6.0_24-b07-334 Locale:ja_JP.UTF-8 Even if you run Mac OS X under UTF-8 locale the default project encoding for eclipse is set to MacRoman. This has undesirable effects such as not being able to enter Japanese name for Java class etc. I am reporting this bug as a minor as changing the encoding to UTF-8 manually solves the problem. This however is a huge usability issue. Reproducible: Always Steps to Reproduce: 1.Start eclipse under Mac OS X with locale ja_JP.UTF-8 2.Create a new Java project. 3. Under the newly created project create a new class. Try to input DBCS filename, it will give you error saying invalid identifier for class name.
I suspect that the VM you are using doesn't detect the Java 'file.encoding' property correctly. Can you attach your configuration: 1. Help > About Eclipse SDK 2. click 'Installation Details' 3. click on the 'Configuration' tab 4. click 'Copy to Clipboard' 5. paste into bugzilla
I tried it on an older Mac and I see the same - the default encoding is set to "MacRoman" despite both "osgi.nl" and "osgi.nl.user" properly set to "ja_JP.UTF-8". (This is with a 1.5 VM, 32bit.) The value is received from the call to IContainer#getDefaultCharset(false). I'll forward this to Platform/Resources for comment. Personally, I am not sure about the idea of deriving encoding from locale. Consider Eclipse development itself with its distributed teams. Plus, there is already a preference on the "Workspace" preference page to set default text encoding.
> I tried it on an older Mac and I see the same - the default encoding is set to > "MacRoman" Oleg, I assume the value of the 'file.encoding' system property is the same, correct? > Personally, I am not sure about the idea of deriving encoding from locale. I don't think that this is done (or should be done). Normally a command shell has a default (or current) encoding/code page. That encoding should then be returned by the Java VM property 'file.encoding' and that's what Eclipse uses to initialize the workspace default. This is unrelated to the locale on most systems. > Consider Eclipse development itself with its distributed teams. Plus, there is > already a preference on the "Workspace" preference page to set default text > encoding. Distributed teams should set the encoding on the project so that it is shared among developers via the project's team provider (e.g. CVS). The same can be done for launch configurations to avoid problems when launching stuff. This is also important independent of whether the encoding would be derived from the locale or not as the default encoding of e.g. Linux and Windows already differ out of the box.
This does not look like an Eclipse bug to me.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the "stalebug" whiteboard tag.