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.
Product Version: NetBeans IDE Dev (Build 200710090000) Java: 1.6.0_03 SunOS 5.11; eucJP-open; ja_JP (nb) Please try the following steps, it seems that the contents in yaml file have been changed after the saving. 1. unzip test.zip (will be attached) 2. rename 01_basics.yml.1 to 01_basics.yml 3. create ruby on rails project, project encoding is UTF-8 4. open it on NetBeans Editor 5. delete one line and undo 6. save The size of the original file is 25650 bytes, but now 11530 bytes. The file contains UTF-8 characters. % ls -l 01_basics.yml* -rw-r--r-- 1 katakai staff 11530 2007-10-12 13:31 01_basics.yml -rw-r--r-- 1 katakai staff 25650 2007-10-12 13:31 01_basics.yml.1 %
Created attachment 50772 [details] test data
Data-lost => P1 Reproducible (randomly) with similar text in a .jsp as well, probably a issue in languages module. Reassign to Hanz for for evaluation.
I am not able to reproduce it. When a line is deleted and undo is applied, the file content is unchanged and save is disabled, so I have tried to delete a line and save, but without success. It can be editor related issue, what about changing 01_basic.yml to 01_basic.txt, is it reproducible for text file variant of the file?
Yes, is reproducible with .txt file as well. to reproduce: ------------- 1) create a new .txt 2) replace it content by content from 01_basics.yml.1 3) save it and check the file on disc NOTE: the file looks OK 4) type something on the end of the file 5) save it and check the file on disc ERROR: the latest change does not appear in the file
Still not reproducible in my case, may be random. Ccing Mila and Vita, pherhaps they could help with the evaluation.
reassining to editor
I'm looking into it.
Well, I'm still not sure what actually happened, but it does not seem to be an encoding issue. The 01_basics.yml is basically a cut-off version of 01_basics.yml.1. So, for some reason only the beginning of the file was saved. But this beginning also contains japanese characters and they look ok AFAICT. Did you guys get any exceptions? Can you attach a log file from the IDE session when you saved the file? Thanks
Created attachment 50937 [details] IDE log file: but I could not see any exception here
Fixed in trunk. Checking in src/org/netbeans/api/queries/FileEncodingQuery.java; /cvs/projects/queries/src/org/netbeans/api/queries/FileEncodingQuery.java,v <-- FileEncodingQuery.java new revision: 1.7; previous revision: 1.6 done Checking in test/unit/src/org/netbeans/api/queries/FileEncodingQueryTest.java; /cvs/projects/queries/test/unit/src/org/netbeans/api/queries/FileEncodingQueryTest.java,v <-- FileEncodingQueryTest.java new revision: 1.5; previous revision: 1.4 done RCS file: /cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/longUnicode.txt,v done Checking in test/unit/src/org/netbeans/api/queries/data/longUnicode.txt; /cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/longUnicode.txt,v <-- longUnicode.txt initial revision: 1.1 done
Verified in a custom build, cannot reproduce any more. Masaki, please can you confirm it.
Sure, I'll check.
Product Version: NetBeans IDE Dev (Build 200710160000) Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06 System: Windows XP version 5.1 running on x86; MS932; ja_JP (nb) Userdir: E:\tmp\nb.200710160000 I tried some other files, it's reproducible for me. The original issue - 01_basics.yml.1 is now OK. Will you try 01_basics.yml? It shrunk to 8K from 11K. This issue was reported from community folk in Japan so I have the original file. But I could not put it into issuezilla because it contains personal data. I can still reproduce the issues with the original file. Please let me know if you need the file.
Fixed in trunk. Checking in src/org/netbeans/api/queries/FileEncodingQuery.java; /cvs/projects/queries/src/org/netbeans/api/queries/FileEncodingQuery.java,v <-- FileEncodingQuery.java new revision: 1.8; previous revision: 1.7 done Checking in test/unit/src/org/netbeans/api/queries/FileEncodingQueryTest.java; /cvs/projects/queries/test/unit/src/org/netbeans/api/queries/FileEncodingQueryTest.java,v <-- FileEncodingQueryTest.java new revision: 1.6; previous revision: 1.5 done RCS file: /cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/longUnicode2.txt,v done Checking in test/unit/src/org/netbeans/api/queries/data/longUnicode2.txt; /cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/longUnicode2.txt,v <-- longUnicode2.txt initial revision: 1.1 done Checking in src/org/netbeans/modules/xml/api/XmlFileEncodingQueryImpl.java; /cvs/xml/core/src/org/netbeans/modules/xml/api/XmlFileEncodingQueryImpl.java,v <-- XmlFileEncodingQueryImpl.java new revision: 1.8; previous revision: 1.7 done
Masaki, please, verify that the fix ok? It should be merged also in beta2 branch.
The fix has been integrated into #4004. I have verified that these 3 examples can be stored properly on hudson build #4004. #4004 : OK #4003 : FAIL
Verified in custom build. Tomasi, can you please merge it into beta2 branch?
OK
Integrated into beta2. Checking in projects/queries/src/org/netbeans/api/queries/FileEncodingQuery.java; /cvs/projects/queries/src/org/netbeans/api/queries/FileEncodingQuery.java,v <-- FileEncodingQuery.java new revision: 1.6.4.1; previous revision: 1.6 done Checking in projects/queries/test/unit/src/org/netbeans/api/queries/FileEncodingQueryTest.java; /cvs/projects/queries/test/unit/src/org/netbeans/api/queries/FileEncodingQueryTest.java,v <-- FileEncodingQueryTest.java new revision: 1.4.4.1; previous revision: 1.4 done Checking in xml/core/src/org/netbeans/modules/xml/api/XmlFileEncodingQueryImpl.java; /cvs/xml/core/src/org/netbeans/modules/xml/api/XmlFileEncodingQueryImpl.java,v <-- XmlFileEncodingQueryImpl.java new revision: 1.7.2.1; previous revision: 1.7 done
Verified in beta2 build