Skip to content

Encoding problem? #813

@FengTai-Red

Description

@FengTai-Red

Chinese cannot be displayed normally

Environment
  • Operating System:Windows 10
  • JDK version:14.0.1
  • Visual Studio Code version:1.45
  • Java extension version:Java Extension Pack 0.9.0
  • Java Debugger extension version: 0.25.1
Steps To Reproduce

My English is poor. I tried to translate it as faithfully as possible.
On my computer,running the code below,return chinese is null.

`import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class testA {
public static void main(String[] args) throws IOException {
InputStream a = System.in;
InputStreamReader b = new InputStreamReader(a, "UTF-8");
BufferedReader br = new BufferedReader(b);
System.out.println("===Output===");
System.out.print("输入:");
String msg = br.readLine();
System.out.print("输出:" + msg + "\n");
System.out.println("===Output===");
}
}`

A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions