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

Chinese character output not supported? #487

Closed
wlnirvana opened this issue Mar 14, 2019 · 4 comments
Closed

Chinese character output not supported? #487

wlnirvana opened this issue Mar 14, 2019 · 4 comments

Comments

@wlnirvana
Copy link

Example (It seems the link can be accessed by NON-DOMAIN members)

Code:

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		System.out.println("你好");

	}

}

Self-test input (cannot be left empty):

1

Self-test output:

你好

Verdict: WA

@twd2
Copy link
Member

twd2 commented Mar 15, 2019

You can use UTF-8 encoding for output since the answer file is in UTF-8 encoding:

import java.util.Scanner;
import java.io.PrintStream;

public class Main {
	public static void main(String[] args) throws java.io.UnsupportedEncodingException {
		PrintStream ps = new PrintStream(System.out, true, "UTF-8");
		ps.println("你好");
	}
}

and then get AC.

@twd2
Copy link
Member

twd2 commented Mar 15, 2019

So there is an issue for https://github.com/vijos/jd4 that what the default encoding is and why it is not UTF-8.

@wlnirvana
Copy link
Author

Not necessarily the entire jd4 engine, as this appears to be a Java-only issue. Just tested against C and Python, and both got AC.

@twd2
Copy link
Member

twd2 commented Mar 15, 2019

You can open an issue for jd4 to file this problem.

Closing, while you can still feel free to reopen this issue if you have any updates.

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

No branches or pull requests

2 participants