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.
By default, there is no encoding specified for input.xml. By default, output.xml has UTF-8 as its encoding type. I think it is ok to have different encoding types for input.xml and output.xml files. However, I think it makes sense to have the same encoding for expected output.xml and generated (Actual**.xml) output.xml files. Currently, when I change the output.xml encoding to something else (eg., EUC-JP), the generated output.xml is still in UTF-8. It seems inconsistent. The interesting thing is, the test still passes, even though the encoding types are different. I am not sure why it still works. I also ran native2ascii to verify that output.xml in EUC-JP is indeed in EUC-JP and Actual**.xml (generated output.xml) in UTF-8 is indeed in UTF-8, so the files are encoded correctly. Steps to reproduce: 1. Create a basic bpel and wsdl. 2. Type some Japanese character in place of ?string? in input.xml. 3. Run the test. The system will ask if you want to use the current output.xml as the expected output.xml, as it is currently empty. Selec OK. 4. Edit output.xml and change encoding to EUC-JP from UTF-8. 5. Run the test again. 6. View the generated output.xml file. Encoding is set to UTF-8, but the expected output.xml's encoding is set to EUC-JP. Test still passes.
By simply changing the XML encoding attribute from UTF-8 to EUC-JP (in step 4), you are not really changing the underlying encoding of the file. I am not sure which encoding the XML parser will take precedence, the encoding in the XML prolog, or the underlying encoding. We are still waiting for the XML team to provide us a real XML Diff utility. I don't know if that utility will treat different encoding in the prolog as a difference or not. I will ask the XML team to answer these questions.
I have filed a xdm bug 84533 to take care of the encoding issue. Our team would prioritize this bug.
Hi, Can you please advise me if the following is a valid test case? 1. actual output.xml in EUC-JP. 2. generated output.xml in EUC-JP. I would like to confirm before adding the test case. Thanks. --Naoko
With the latest xml diff utility we get from the xml team, two xml files with different encoding will be identified as different. That means if you manually change the encoding of the expected output from "UTF-8" to "EUC-JP", and the actual output has an encoding of "UTF-8", then the test case will fail. The xml diff change was just checked in earlier today . You need to wait for the next installer build to test it. FYI, with this new build, you need to close all your compapp projects and reopen them in NetBeans to have those projects properly updated.
I tested this using the latest 060925_1 build. Here is my test case. 1. Modified Output.xml so that encoding is now set to EUC-JP. See expected_output_xml_060925_1.jpg. 2. Cleaned up all applications and restarted NetBeans. 3. Did a clean build / deploy. Ran the test. Here is what I observed. 1. The test did fail with the following error message: "The response is not identical to the expected output." This is expected. 2. However, the diff window has some issues. a. Diff window shows that expected Output.xml is still in UTF-8. It is strange, since I changed it to EUC-JP. See diff_window_060925_1.jpg. b. Diff window does not tell me which line is breaking (it used to highlight the line that was causing the diff to fail). Also, I am concerned about this statement here: "FYI, with this new build, you need to close all your compapp projects and reopen them in NetBeans to have those projects properly updated." Is this the final expected behavior or will this be fixed? Re-openining the issue for further investigations.
Created attachment 34551 [details] Expected output.xml
Created attachment 34552 [details] Diff window showing incorrect encoding type
Fixed hard-coded UTF-8 encoding when presenting the diff view. ========== Checking in DiffStreamSource.java; /cvs/enterprise/compapp/projects/jbi/src/org/netbeans/modules/compapp/test/ui/Attic/DiffStreamSource.java,v <-- DiffStreamSource.java new revision: 1.1.2.5; previous revision: 1.1.2.4 done ==========
All the builds are bad since 060925_1. I will verify it once a good build becomes available.
Tested on the latest 060929 build. I don't see both output windows anymore - I only see the expected output. Please see the attached image (missing_actual_window_diff.jpg). Re-opening the issue for further investigations.
Created attachment 34730 [details] Actual output is missing in diff view
Could you open the actual output file and see if it looks something like this: <?xml version="1.0"?> <?xml version="1. ......... If this is the case, then that explains why the actual output file in the diff view is missing. This problem is tracked by IZ 86095 and is claimed to be fixed now. If this is not the case, please reopen this ticket with the actual output file attached.
Verified that this is exactly the problem. Adding IZ 86095 as an issue that this issue depends on. Will close the issue after I verify that everything is ok. Please keep it open until then.
Tested using the latest 061002 build. Verified that it is now working correctly. Closing the issue as verified/closed.