Community
Participate
Working Groups
OS: Windows2000 Simplified Chinese Version + GB18030 Patch Eclipse Build: 20020321 Stable Build Java Version: J2RE 1.4.0 IBM Windows 32 build cndev-20020405 (JIT enabled: jitc) (Beta) Couldn't use Text Editor in Eclipse to open an unicode-encoding xml file (created by Cam-thu le)which contains some GB18030 character. Re-produce Steps: 1. Import the welcome.xml to a project. 3. Right Click welcome.xml->open with->Text Editor(xml7.jpg) 4. An error windows pops up(xml8.jpg) 7. A detail error message in detail(xmlerr.txt)
Could you please attach the referenced error texts/pics? Thanks.
Created attachment 585 [details] XML file
Created attachment 586 [details] error message
Created attachment 587 [details] Screen Cut of the step 3
Created attachment 588 [details] Screen Cut of the step 4
The stack trace shows that an error occurs creating the document for the editor. A second error then occurs because StorageDocumentProvider tries to create a Status with a null plug-in ID (see bug 9052). The cause of the original error is unknown. Moving this one to UI.
When I open it on a GB18030 compliant VM (Sun JDK 1.4) it opens without an error but the characters are shown in correctly encoded. It is possible to paste the correct characters back in, save and reopen but then they show up as a series of ?. Please note that not all GB18030 characters have a unicode mapping - this may be bigger than the simple unicode problem. However it may be related to Bug 9069 so I have added it to the dependancy list.
Note that this is also te behaviour in Notepad which gives me a warning about saving with GB 18030 characters.
In the Hursley 1.3.1 VM in build 20020411 if you enter the characters ༃༄༅༆༇༈ into the welcome.xml and then save anb reopen the characters come back correctly and there are no errors. The initial entry does not show the characters but I am not sure how this file was saved.
I use the WordPad of the Windows to edit the welcome.xml. After input some GB18030 character into the file, I saved it as a Unicode Encoding file- welcome.txt and then I rename the txt to xml. After that I replace the welcome.xml in the eclipse SDK. The welcome page displays well when I start up the Eclipse. But I got an internal error when I tried to open it with Text editor in Eclipse after I had imported the welcome.xml into a project.
Reopening to investigate new information
I can replicate the incorrect characters but not the Internal Error in build 0418. Can you still get the Internal Error on 20020418?
Logged Bug 14335 for the read/write problem.
Should have been Bug 14435.
OS: Windows2000 Simplified Chinese Version + GB18030 Patch Eclipse Build: 20020418 Java Version: J2RE 1.3.1 IBM Windows 32 build cn131-20020403 (JIT enabled: jitc) I still get the internal error in build 0418: java.lang.IllegalArgumentException: at org.eclipse.core.internal.runtime.Assert.isLegal(Assert.java:50) at org.eclipse.core.internal.runtime.Assert.isLegal(Assert.java:35) at org.eclipse.core.runtime.Status.setPlugin(Status.java:151) at org.eclipse.core.runtime.Status.<init>(Status.java:59) at org.eclipse.ui.editors.text.StorageDocumentProvider.setDocumentContent (StorageDocumentProvider.java:83) at org.eclipse.ui.editors.text.FileDocumentProvider.setDocumentContent (FileDocumentProvider.java:213) at org.eclipse.ui.editors.text.StorageDocumentProvider.createDocument (StorageDocumentProvider.java:126) at org.eclipse.ui.editors.text.FileDocumentProvider.createElementInfo (FileDocumentProvider.java:368) at org.eclipse.ui.texteditor.AbstractDocumentProvider.connect (AbstractDocumentProvider.java:247) at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput (AbstractTextEditor.java:1503) at org.eclipse.ui.texteditor.AbstractTextEditor.init (AbstractTextEditor.java:1146) at org.eclipse.ui.internal.EditorManager.createSite (EditorManager.java:485) at org.eclipse.ui.internal.EditorManager.access$1 (EditorManager.java:483) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:467) at org.eclipse.swt.custom.BusyIndicator.showWhile (BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:529) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:361) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:264) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1586) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1487) at org.eclipse.ui.actions.OpenWithMenu.openEditor (OpenWithMenu.java:228) at org.eclipse.ui.actions.OpenWithMenu.access$0(OpenWithMenu.java:222) at org.eclipse.ui.actions.OpenWithMenu$2.handleEvent (OpenWithMenu.java:149) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java (Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:833) at org.eclipse.ui.internal.Workbench.run(Workbench.java:816) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:643) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:349) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:195) at org.eclipse.core.launcher.Main.run(Main.java:541) at org.eclipse.core.launcher.Main.main(Main.java:396)
Works in build 20020515. Please note that workbench.xml specifies that it is in UTF 8 in the xml declaration. If not save it in an encoding otehr than UTF8 there is no guarantee that it would work. However I tried both unicode and UTF8 versions of the file and both work in 20020515. The characrters will npt disaply unless you have the banner font set to a GB18030 compliant font.
Verify with following test environment: Eclipse Build: 20021218 Stable Build (bug occured) JRE version: J2RE 1.3.1 IBM Windows 32 build cn140-20020902 (JIT enabled: jitc) Result: Could not read unicode file, but no internal error message.(see Attachment below) Eclipse Build: 20021218 Stable Build (bug occured) JRE version: J2RE 1.4.0 IBM Windows 32 build cn140-20020902 (JIT enabled: jitc) Result: Could not read unicode file, but no internal error message.(see Attachment below)
Created attachment 3093 [details] Error message metioned in comment #17