redhat-developer / redhat-developer/vscode-java

Is there any way for the terminal used by vscode to recognize the input Greek letters

オープン
#2,457 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

caused-by-extension question
主要言語
TypeScript
スター
2.3k
フォーク
546
平均マージ
20時間 1分
マージ済み PR(30日)
11

説明

This is a problem I saw on stack overflow.
OP have the following code:

`public static void main(String[] args) throws Exception {
System.setProperty("file.encoding","UTF-8");
System.out.println("File encoding is " + System.getProperty("file.encoding"));

Scanner console = new Scanner(new InputStreamReader(System.in, StandardCharsets.UTF_8));
PrintStream sysout = new PrintStream(System.out, true, StandardCharsets.UTF_8);

sysout.println("\nTests:");
sysout.println("Can we print lambda using unicode? Let's see: \u03BB");

sysout.print("Copy and paste the lambda above here: ");
String line = console.nextLine();

sysout.println("\nThe input consisted of " + line.length() + " character(s).");
sysout.println("The input was: " + line);

if (line.equals("λ")) {
    sysout.println("lambda (λ) was detected with .equals!");
} else {
    sysout.println("lambda (λ) was not detected with .equals.");
}

printHexOfString("Hex of λ", "λ");
printHexOfString("Hex of input", line);

}

private static void printHexOfString(String title, String str) {
StringBuilder stringBuilder = new StringBuilder();

char[] charArray = str.toCharArray();

for (char c : charArray) {
    String charToHex = Integer.toHexString(c);
    stringBuilder.append(charToHex);
}

System.out.println(title+ ": "+stringBuilder.toString());

}`

OP means that when he is using eclipse, the terminal of eclipse can recognize the input“ λ ".

When using vscode, we know that VScode using the CMD shell of windows, the Greek letters cannot be recognized (Greek letters are copied and pasted into the input box).

I tried different ISO charsets like 437 869 65001 936, but it didn't work.

Some of them can recognize "λ" as any other letter, but the other recognize "λ" as "".

Is there any way for the terminal used by vscode to recognize the input Greek letters?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、Windows CMD と記載されたエンコーディングを使って VS Code のターミナルで Java スニペットを再現し、貼り付けた λ と Eclipse のターミナルを比較します。リポジトリにターミナルまたはエンコーディングのエントリーポイントがあるか確認してください。この issue には対象とするファイルやテストがありません。完了条件は、入力を認識するサポートされた方法を確立すること、またはそれを提供できるリポジトリの変更はないことを文書化することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java, vscode
領域
cli, developer-experience, operating-systems
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
20/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。