Skip to content

[Bug] CJK characters showing up as red invalid characters #2833

Closed

Description

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Code

// The Monaco Editor can be easily created, given an
// empty container and an options literal.
// Two members of the literal are "value" and "language".
// The editor takes the full size of its container.

monaco.editor.create(document.getElementById('container'), {
	value: "function hello() {\n\talert('Hello world!');\n}",
	language: 'javascript'
});

이것은 한글 입니다.  // < ---- this line

Actual Behavior

The Korean character should be accepted. regard less to syntax.

Even if it is a valid syntax, it will still show up as red character. e.g. in jsx string <div>한글</div>

Expected Behavior

No response

Additional Context

image

Activity

  1. rcjsuen commented on Dec 15, 2021

    @rcjsuen
    Contributor

    Universe (@softmarshmallow) It will not accept random Korean characters because the syntax is invalid. If you put it in a string it will not flag it as an error.

    image

  2. softmarshmallow commented on Dec 15, 2021

    @softmarshmallow
    Author

    Remy Suen (@rcjsuen) It also does not work in jsx/tsx Try tsx / jsx file with this content.

    not working - <div>한글</div>
    works (of-course) <div>{"한글"}</div>

  3. rcjsuen commented on Dec 15, 2021

    @rcjsuen
    Contributor

    I don't think the Monaco Editor supports JSX out-of-the-box. See #264.

  4. softmarshmallow commented on Nov 9, 2022

    @softmarshmallow
    Author

    Remy Suen (@rcjsuen) What about the part that CJK Characters displaying as a red char? How do I solve that part (regarding less to JSX)

  5. locked and limited conversation to collaborators on Mar 3, 2023
  6. converted this issue into a discussion #3674 on Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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