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.
[ 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
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?
Created attachment 26077 [details] output of list-properties.jar
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.
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
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
The issue #67337 is fixed. Does it mean this one is fixed too?
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?
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.
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.
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?
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.
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
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.
File encoding issue.
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.