Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 545769

Summary: [console] UTF-8 content read or send to process can be corrupted
Product: [Eclipse Project] Platform Reporter: Paul Pazderski <paul-eclipse>
Component: DebugAssignee: Paul Pazderski <paul-eclipse>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: loskutov, robert_lu00, sarika.sinha, yoshito_umaoka
Version: 4.12   
Target Milestone: 4.12 M3   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/139464
https://git.eclipse.org/r/139465
https://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?id=bd26d4f1c3635d683d078d9352467c7879571d62
https://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=610a5fa960a7fbf09d7fd59db2240b77eb515048
Whiteboard:
Bug Depends on: 546641, 550345    
Bug Blocks: 552030    

Description Paul Pazderski CLA 2019-03-25 20:08:20 EDT
The ProcessConsole can in some cases corrupt the content read or send to the processes standard IO streams.

How to reproduce:
 - In console with UTF8 encoding run the following snippet.
============
import java.util.Collections;
public class Umlaut {
	public static void main(String[] args) {
		String out = ">" + String.join("", Collections.nCopies(4200, "\u00F6"));
		System.out.print(out);
	}
}
============

You should see that an 'รถ' is missing near the end and instead two replacement characters shown.
Comment 1 Eclipse Genie CLA 2019-03-25 20:11:53 EDT
New Gerrit change created: https://git.eclipse.org/r/139464
Comment 2 Paul Pazderski CLA 2019-03-25 20:12:23 EDT
(In reply to Eclipse Genie from comment #1)
> New Gerrit change created: https://git.eclipse.org/r/139464

The patch depends on bug 307309 because the InputStreamReader has problems using the IOConsoleInputStream.
Comment 3 Eclipse Genie CLA 2019-03-25 20:14:07 EDT
New Gerrit change created: https://git.eclipse.org/r/139465
Comment 4 Paul Pazderski CLA 2019-03-25 20:14:56 EDT
(In reply to Eclipse Genie from comment #3)
> New Gerrit change created: https://git.eclipse.org/r/139465

I finished this test case for JDT suite first and won't throw away my work even after I created a similar test for Platform test suite.
Comment 5 Sarika Sinha CLA 2019-03-25 22:53:25 EDT
@Andrey,
Will you be able to review this?
Comment 6 Andrey Loskutov CLA 2019-03-27 09:00:28 EDT
(In reply to Sarika Sinha from comment #5)
> @Andrey,
> Will you be able to review this?

In theory yes, but right now I'm pretty loaded. I will put it on our internal task list, just after the task to review the patch for bug 544970 :-).
Comment 7 Sarika Sinha CLA 2019-04-05 01:19:43 EDT
Thanks Andrey, Moving to M3 !
Comment 9 Sarika Sinha CLA 2019-05-21 01:25:47 EDT
@Paul!
Can you please verify this bug with latest I build ?
Comment 10 Paul Pazderski CLA 2019-05-21 03:51:40 EDT
Verified using Build id: I20190520-1805
Comment 12 Paul Pazderski CLA 2019-11-22 07:44:24 EST
*** Bug 266658 has been marked as a duplicate of this bug. ***
Comment 13 Paul Pazderski CLA 2020-06-27 09:31:39 EDT
*** Bug 513424 has been marked as a duplicate of this bug. ***