Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set console stream encoding for java >= 19 - eclipse.platform.debug#124 #246

Merged
merged 1 commit into from Jul 14, 2023

Conversation

jukzi
Copy link
Contributor

@jukzi jukzi commented May 24, 2023

What it does

Set "-Dstdout.encoding" and "-Dstderr.encoding" to the value specified in launch configration:
to fix eclipse-platform/eclipse.platform#530
This does NOT fix the issue for JDK 18, as there is no official parameter for that JVM.
Relevant is the Java Version of the JVM to launch.

How to test

Launch a programm that outputs non-Ascii chars. For example:
image

public class ConsoleTest {
	public static void main(String[] args) {
		System.out.println("hällö€");
		System.err.println("hällö€");
	}
}

Tested on JDK 17, JDK 19 with UTF-8, ISO-8859-1, windows-1252
image
image

Author checklist

@jukzi
Copy link
Contributor Author

jukzi commented May 24, 2023

Also fixes duplicate eclipse-jdt/eclipse.jdt.core#146

@jukzi
Copy link
Contributor Author

jukzi commented Jun 9, 2023

unrelated random fail #258

@jukzi jukzi merged commit ff25c2d into eclipse-jdt:master Jul 14, 2023
9 checks passed
@jukzi jukzi deleted the encoding branch July 14, 2023 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

utf-8 output on Java >= 18 is not shown correctly in Console
2 participants