| Summary: | Display problem in console when a line reaches 4096 characters | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | captmjc |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, eclipse.felipe, pwebster, remy.suen |
| Version: | 3.6 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
I can reproduce the problem on my Windows 7 box but I had to increase the loop length to see it. Pasting the invisible stuff to Notepad indeed reveals the characters. Pasting into SWT TextEditor example eats them again. Likely a duplicate of bug 307979. Which is probably a duplicate of another bug. The bug may be related to the character type.
The test case:
for (int i = 0; i < 1024; i++) {
System.out.print("abcd");
}
System.out.println(); // NG
for (int i = 0; i < 1024; i++) {
System.out.print("ABCD");
}
System.out.println(); // NG
for (int i = 0; i < 1024; i++) {
System.out.print("1234");
}
System.out.println(); // NG
for (int i = 0; i < 1024; i++) {
System.out.print("ab12");
}
System.out.println(); // OK
for (int i = 0; i < 1024; i++) {
System.out.print("+-*/");
}
System.out.println(); // NG
for (int i = 0; i < 1024; i++) {
System.out.print("0-*/");
}
System.out.println(); // OK
// The following lines might need chinese font support
for (int i = 0; i < 2048; i++) {
System.out.print("\u4f60\u597d"); // Chinese characters nihao or hello
}
System.out.println(); // OK
for (int i = 0; i < 1024; i++) {
System.out.print("\u4f60\u597d"); // Chinese characters nihao or hello
System.out.print("ab");
}
System.out.println(); // OK
for (int i = 0; i < 1024; i++) {
System.out.print("\u4f60\u597d"); // Chinese characters nihao or hello
System.out.print("12");
}
System.out.println(); // OK
|
Build Identifier: 20110218-0911 When there are at least 4096 characters in a single line, all characters become whitespaces. However,when you copy the line into other editors, such as notepad, everything is fine. The test case: StringBuilder sb = new StringBuilder(4096); for (int i = 0; i < 1023; i++) { sb.append("abcd"); } System.out.println(sb); // OK sb.append("abc"); System.out.println(sb); // OK sb.append("d"); System.out.println(sb); // NG Reproducible: Always Steps to Reproduce: 1. Run the test case in the bug details. 2. There are three lines of system output in the console, and the last one seems to be composed of whitespaces. 3. Copy the last line to another text editor, such as notepad. The content is "abcd...." without a single space.