Project: Eclipse_Platform_UI
Bug 182490 [WorkbenchLauncher] DBCS3.3: new workspace with copy layout makes invalid workbench.xml
Reported: 2007-04-16 00:35:14 | Status: closed fixed

If NL pack is installed, resource name is not encoded to UTF-8 in workbench.xml at copy layout function in switching workspace Platform : WindowsVista Business Japanese Build: Eclipse 3.3 I20070410-1043 NL pack: 20070317 Steps to recreate 1- launch eclipse with brand new workspace 2- File > Switch Workspace > Other..., enter new workspace name 3- turn on Workbench Layout, then click OK Result following error was show at the start up. I found that NL resource names of workspace/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml were encoded by platform default MS932 not UTF-8. It's a cause of this problem. eclipse.buildId=I20070410-1043 java.fullversion=J2RE 1.5.0 IBM J9 2.3 Windows Vista x86-32 j9vmwi3223-20070328 (JIT enabled) J9VM - 20070326_12093_lHdSMR JIT - 20070323_1801_r8 GC - 20070307_AA BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ja_JP Framework arguments: -startup D:\IES33\I20070412\eclipse\plugins\org.eclipse.equinox.launcher_1.0.0.v20070409.jar Command-line arguments: -os win32 -ws win32 -arch x86 -startup D:\IES33\I20070412\eclipse\plugins\org.eclipse.equinox.launcher_1.0.0.v20070409.jar -data D:\IES33\I20070412\eclipse\1 -consolelog Mon Apr 16 13:16:36 JST 2007 "org.eclipse.ui.workbench" org.eclipse.ui.WorkbenchException: XML at org.eclipse.ui.XMLMemento.createReadRoot(XMLMemento.java:121) at org.eclipse.ui.XMLMemento.createReadRoot(XMLMemento.java:64) at org.eclipse.ui.internal.Workbench$46.run(Workbench.java:1869) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1864) at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(WorkbenchConfigurer.java:183) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:751) at org.eclipse.ui.internal.Workbench.init(Workbench.java:1338) at org.eclipse.ui.internal.Workbench.access$33(Workbench.java:1274) at org.eclipse.ui.internal.Workbench$55.run(Workbench.java:2280) org.eclipse.ui.WorkbenchException[0]: sun.io.MalformedInputException at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:262) at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:314) at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:364) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:250) at java.io.InputStreamReader.read(InputStreamReader.java:212) at java.io.BufferedReader.fill(BufferedReader.java:157) at java.io.BufferedReader.read1(BufferedReader.java:208) at java.io.BufferedReader.read(BufferedReader.java:282) at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source) at org.apache.xerces.impl.XMLEntityScanner.skipString(Unknown Source) at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at org.eclipse.ui.XMLMemento.createReadRoot(XMLMemento.java:94) at org.eclipse.ui.XMLMemento.createReadRoot(XMLMemento.java:64) at org.eclipse.ui.internal.Workbench$46.run(Workbench.java:1869) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1864) at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(WorkbenchConfigurer.java:183) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:751) at org.eclipse.ui.internal.Workbench.init(Workbench.java:1338) at org.eclipse.ui.internal.Workbench.access$33(Workbench.java:1274) at org.eclipse.ui.internal.Workbench$55.run(Workbench.java:2280)

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchLayoutSettingsTransfer.java