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.
When I create new properties file I got the following issue: # Date: 3 ëèï 2008. Author: Maksym. See "ëèï". The file template for properties file is: # Date: ${date}. Author: ${user}. Encoding for the project is: windows-1251. Regional standards and formats: Ukrainian. Long date format: d MMMM yyyy' р.' Location: Ukraine. Language for non-Unicode programs: Ukrainian.
What happens if you type the month directly to the properties file? And what happens if you do this with the project encoding set to UTF-8? And on a properties file that does not belong to any project? Also what is your system default encoding (you can find it in Help->About)? Thanks CCing Marian who might have come across similar problem.
It is OK when I type the month directly to the properties file (either in windows-1251 or utf-8). When I create new properties in utf-8 the bug is still there. It is also there if i open properties file without project. My "Help->About" displays: Product Version: NetBeans IDE 6.1 (Build 200805300101) Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22 System: Windows XP version 5.1 running on x86; Cp1251; uk_UA (nb) Userdir: D:\PFiles\Settings\NetBeans\6.1
Thanks for the info. I vaguely remember that there were some encoding peculiarities in properties files. IIRC the properties files used to have to be encoded in LATIN-1 (a JDK requirement) or something similar. The properties module guys should be able to advise further. Btw, is the same working in java files?
It is OK with java files.
This bug was introduced by a fix of P1 bug #102629 ("FileEncodingQuery instantiates DataObject too soon"). Details: All .properties files have the same encoding (ISO-8859-1) and this encoding is held in Lookups of the corresponding FileObjects. Before fix of bug #102692, class org.netbeans.modules.openide.loaders.DataObjectEncodingQueryImplementation used the FileObjects' Lookup to find the encoding. The modification made to fix bug #102629 disabled this piece of code so the FileEncodingQuery returns the project's default encoding, which is wrong.
Correction: It's a DataObject, not a FileObject, what holds a Lookup.
This is a bug in org.netbeans.modules.openide.loaders.DataObjectEncodingQueryImplementation. It ignores encoding of some newly created DataObjects under certain circumstances. I am attaching a test that manifests the bug.
Created attachment 64687 [details] test
Test is perfect. I'd love to fix the problem. But I cannot. Issue 102629 is build around not asking the newly created objects for FEQI unless they are fully instantiated. And your test check that we do ask for FEQI. What can I do in openide.loaders? Please advice. Moving back to properties, unless some compatible fix is found in openide.loaders.
Created attachment 66569 [details] I moved the test to templates module and simplified it a bit. Still fails.
Moving back to "openide/data systems" - there is no benefit in tracking this bug in "properties".
core-main#64f590e0c3b6