This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 67026 - [50cat] I18N - Default encoding sources not working
Summary: [50cat] I18N - Default encoding sources not working
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2005-10-18 09:52 UTC by jcstover
Modified: 2007-09-20 09:46 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
output of list-properties.jar (1.59 KB, text/plain)
2005-10-18 13:00 UTC, jcstover
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jcstover 2005-10-18 09:52:52 UTC
[ BUILD # : 200510131600 ]
[ JDK VERSION : 1.5.0_04 ]

Using slackware 10.1
Default encoding for java sources not working when checking into cvs. ö changes into ö. In the daily build before the beta I didn't have this problem
Comment 1 Martin Roskanin 2005-10-18 10:10:11 UTC
Didn't you change the property Tools/Options/Classic View/Editing/Java
Sources/Default Encoding? If the property is empty the encoding will be taken
from System property.
Could you please run a list-properties.jar, that can be downloaded from:
http://editor.netbeans.org/servlets/ProjectDocumentList
and attach an output messages?

Petr, wasn't something changed in openide/editor?
Comment 2 jcstover 2005-10-18 13:00:40 UTC
Created attachment 26077 [details]
output of list-properties.jar
Comment 3 Miloslav Metelka 2005-10-18 16:22:11 UTC
You have ISO-8859-1 as "file.encoding". That encoding will likely not handle the
special characters you have mentioned correctly.
You may want to change the value of the "LANG" environment variable. I don't
know what's best for your environment maybe "nl_NL.UTF-8" might work.
Comment 4 jcstover 2005-10-19 09:19:38 UTC
The property on Tools/Options/Classic View/Editing/Java
Sources/Default Encoding is set on UTF-8. So if my settings is still on
ISO-8859-1 I guess something else is wrong. But setting the default encoding in
an older build did work.

Ofcource I agree that I can set the LANG environment variable to correct this
problem, but setting the default encoding should also work
Comment 5 jcstover 2005-10-25 18:29:47 UTC
on the netcat list micheal mention his bug 67337 which describes this problem
but from a different perspective. But is the same as I experience. There is a
problem with the default encoding settings for the java sources
Comment 6 Vitezslav Stejskal 2007-01-10 03:10:52 UTC
The issue #67337 is fixed. Does it mean this one is fixed too?
Comment 7 jcstover 2007-01-10 06:19:30 UTC
Hard to tell. In version 5.5 on Mac I still encounter the problem. It is not as much the detection of the 
encoding of the source file, but more setting of the encoding of a source file. I want my sources to be 
UTF-8, but my environment is ISO-8859-1. 

In which version of Netbeans is it fixed, so I can download that version to check if it is fixed?
Comment 8 Vitezslav Stejskal 2007-01-10 09:42:08 UTC
Well, issue #67337 says: fixed, target milestone 5.0, so I think it's been fixed
since 5.0. What version are you using? Ok, I don't expect you to be using
anything older then 5.0 and because you are saying that it's still a problem on
Mac my conclusion is that this issue is different from #67337 and is still a
problem.

I am just not sure where the problem is. If you create a java file outside of
Netbeans with UTF-8 encoding, then load it to Nb, make changes and save it. Does
it stay in UTF-8 or is the encoding changed to your system default? Then, let's
say it's still UTF-8, if you add this source to CVS, delete its local copy and
'cvs up' it. Does the encoding remain UTF-8?

Thanks.
Comment 9 Miloslav Metelka 2007-01-10 12:57:44 UTC
I guess the best solution would be if you would manage to set your system to use
UTF-8 encoding e.g. attempt to run NB with -J-Dfile.encoding=UTF-8
in netbeans.conf.
The problem with the Tools/Options/Classic View/Editing/Java Sources/Default
Encoding might be that e.g. the CVS client could possibly ignore it so this
would be a good test whether it's so.
Comment 10 Vitezslav Stejskal 2007-01-10 22:26:37 UTC
BTW, Mila, where is the 'Default Encoding' setting in dev builds? I don't seem
to be able to find 'Java Sources' in Tools-Options/Advanced Options/Editing. Has
it been removed? Will it be back eventually? Or has it been moved somewhere else?
Comment 11 Miloslav Metelka 2007-01-16 12:25:08 UTC
Since this is about java sources I think that we should reassign to java for
evaluation whether the default encoding property will be supported in the
present java infrastructure or not.
Comment 12 Ken Frank 2007-01-16 16:39:06 UTC
In nb6, where does one set the encoding of a java file ?
I don't see it in options or in props of the java file.

ken.frank@sun.com
Comment 13 Jan Pokorsky 2007-01-16 17:23:27 UTC
The file encoding property of java files was removed within the java
infrastructure rewrite. In view of the fact that issue #42638 is going to be
implemented in nb 6.0 the encoding has been temporarily put out of operation.
#42638 should introduce a new encoding option per project.
Comment 14 Jan Becicka 2007-09-19 14:42:37 UTC
File encoding issue.
Comment 15 Tomas Zezula 2007-09-20 09:46:00 UTC
Fixed by FEQ in NB 6.0, set the project encoding to UTF-8 or to the wanted encoding. All you need to ensure that the
java files under project have the encoding set to the project.