Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 513424 - U+FFFD is intermittently inserted in console output
Summary: U+FFFD is intermittently inserted in console output
Status: RESOLVED DUPLICATE of bug 545769
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.7   Edit
Hardware: PC Windows 10
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-09 18:16 EST by Yoshito Umaoka CLA
Modified: 2020-06-27 09:31 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yoshito Umaoka CLA 2017-03-09 18:16:57 EST
When you run a code printing out multi-byte UTF-8 characters, the Unicode replacement character '�' (U+FFFD) is intermittently inserted in the console output.

Steps to reproduce this issue 

1. Creates a new Java project
2. Sets "Text file encoding" to UTF-8 in project Properties - Resource
3. Creates class - as below:

-----
package com.ibm.test;

public class TestConsole {
	public static void main(String... args) {
		StringBuilder buf = new StringBuilder();
		for (int j = 0; j < 50; j++) {
			buf.append((char)'\uFF11');
		}
		String s = buf.toString();

		for (int i = 0; i < 1000; i++) {
			System.out.println(s);
		}
	}
}
-----

The output prints out 50 FULLWIDTH DIGIT ONE '1'(U+FF11 / UTF-8: EF-BC-91) per line, repeats 1000 times.

The valid output is:

11111111111111111111111111111111111111111111111111

However, REPLACEMENT CHARACTER '�'(U+FFFD / UTF-8: EF-BF-BD) is inserted intermittently. For example:

11111111111111111111111111��11111111111111111111111
1���111111111111111111111111111111111111111111111111


This problem is reproduced on all platforms I tried, including Windows 7 and Ubuntu 16.04LTS.
Comment 1 Eclipse Genie CLA 2020-06-26 15:06:48 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Paul Pazderski CLA 2020-06-27 09:31:39 EDT
Cannot reproduce. Was fixed with bug 545769.

*** This bug has been marked as a duplicate of bug 545769 ***