Community
Participate
Working Groups
Build Identifier: I20110329-0800 Eclipse version:I20110329-0800 OS: Red Hat Enterprise Linux 6.0 Java Version: JRE 1.6.0 IBM Linux build pxi3260sr9fp1-20110208_03 (SR9 FP1) Locale: ja_JP.utf8 Opening a resource using Navigate->Open from Clipboard does not work for resources that have DBCS in them. Reproducible: Always Steps to Reproduce: 1. Create a new Java Class with DBCS name eg 新規クラス.java(also included as attachment) 2. Now copy the class name to the clipboard. 3. Go to Navigate->Open from clipboard 4. You get error message saying “Clipboard content could not be opened, refine it and try again”. It works fine for ascii characters.
Created attachment 192611 [details] DBCS class file
Created attachment 192612 [details] Error message while opening DBCS resources from Clipboard
Open from Clipboard is contributed by JDT
(In reply to comment #3) > Open from Clipboard is contributed by JDT Thanks for pointing that out.
Fixed in HEAD. Available in builds >= N20110407-2000.
Created attachment 192761 [details] Fix
Created attachment 192812 [details] Fix 2 The fix should be more general and support all valid Java identifier characters. The first patch, e.g. didn't support a class called "Blöd".
.
The new DBCS test also failed in the N build from 04/07/2011: expected:<3> but was:<0> junit.framework.AssertionFailedError: expected:<3> but was:<0> at org.eclipse.jdt.debug.tests.ui.OpenFromClipboardTests.testDBCS(OpenFromClipboardTests.java:204) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) at junit.extensions.TestSetup$1.protect(TestSetup.java:23) at junit.extensions.TestSetup.run(TestSetup.java:27) at org.eclipse.jdt.debug.tests.DebugSuite$1.run(DebugSuite.java:54) at java.lang.Thread.run(Thread.java:619)
(In reply to comment #9) > The new DBCS test also failed in the N build from 04/07/2011: Yeah, please comment it out for now. Dani should replace the DBCS characters in the test with \uHHHH sequences.
(In reply to comment #10) > Yeah, please comment it out for now. Done.
Comment on attachment 192812 [details] Fix 2 Indeed a better fix. Also added test case for 'Blöd'.
(In reply to comment #10) > (In reply to comment #9) > > The new DBCS test also failed in the N build from 04/07/2011: > Yeah, please comment it out for now. > > Dani should replace the DBCS characters in the test with \uHHHH sequences. The file was set to UTF-8 but that wasn't picked up by PDE Build. I've replaced the chars with \uHHHH as suggested by Markus instead of adding the encoding to the build.properties. It's easier if all files of the project have the same encoding. Fixed in HEAD (OpenFromClipboardTests.java, rev. 1.8).
(In reply to comment #13) > Fixed in HEAD (OpenFromClipboardTests.java, rev. 1.8). The tests all pass for me locally on Ubuntu / Win 7 64bit
Verified the problem was fixed with I20110421-1800 (Windows XP, 7)
Confirmed fix in Japanese locale as well.