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

The output is treated as the source code for correction prompts #1210

Closed
3 tasks done
Silver-Fang opened this issue Jul 19, 2022 · 11 comments · Fixed by #1375
Closed
3 tasks done

The output is treated as the source code for correction prompts #1210

Silver-Fang opened this issue Jul 19, 2022 · 11 comments · Fixed by #1375
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself topic: theia Related to the Theia IDE framework type: imperfection Perceived defect in any part of project

Comments

@Silver-Fang
Copy link

Silver-Fang commented Jul 19, 2022

Describe the problem

In non-English IDE installations, non-ASCII punctuation characters, such as Chinese brackets (), often appear in the output box. When these symbols appear in the output box, they will be highlighted by the code analysis tool as source code and judged to be obfuscated symbols. This is ridiculous.

To reproduce

Upload the code on the Chinese version of the IDE, you will see:
屏幕截图 2022-07-19 093725

Expected behavior

The output should not be prompted for correction as code.

Arduino IDE version

2.0.0-rc8

Operating system

Windows

Operating system version

10.0.19044.1826

Additional context

No response

Issue checklist

  • I verified the problem still occurs when using the latest nightly build
  • I searched for previous reports in the issue tracker
  • My report contains all necessary details
@Silver-Fang Silver-Fang added the type: imperfection Perceived defect in any part of project label Jul 19, 2022
@per1234 per1234 added the topic: code Related to content of the project itself label Jul 19, 2022
@kittaakos
Copy link
Contributor

Could you please try and modify the advanced settings and let us know if it solved the problem:

  • Open IDE2,
  • Press F1,
  • Type Preferences: Open Settings (JSON), press Enter,
  • Add the following entries to the JSON:
{
 "editor.unicodeHighlight.ambiguousCharacters": false,
 "editor.unicodeHighlight.invisibleCharacters": false
}
  • Close the settings.json by clicking on the X,
  • Tell us if it fixed the issue in the Output.

Here is the ref on how it should work: https://code.visualstudio.com/updates/v1_63#_unicode-highlighting

@Silver-Fang
Copy link
Author

Silver-Fang commented Jul 19, 2022

{
 "editor.unicodeHighlight.ambiguousCharacters": false,
 "editor.unicodeHighlight.invisibleCharacters": false
}

image
No, not fixed.
Highlights disappeared in the real source code, but not in the output box.

@kittaakos
Copy link
Contributor

No, not fixed.
Highlights disappeared in the real source code, but not in the output box.

Thank you so much for trying it and reporting back. I will try to come up with a fix soon.

@kittaakos kittaakos self-assigned this Jul 19, 2022
@kittaakos
Copy link
Contributor

@Silver-Fang, could you please share a bare-minimum sketch that I can use to reproduce the problem? Thank you!

@Silver-Fang
Copy link
Author

@Silver-Fang, could you please share a bare-minimum sketch that I can use to reproduce the problem? Thank you!

You can simply create a new sketch and Verify/Upload. The problem has nothing to do with the sketch. What you really need is a Chinese locale. Maybe you should try to set your OS to Chinese and then launch the IDE?

@Silver-Fang
Copy link
Author

@Silver-Fang, could you please share a bare-minimum sketch that I can use to reproduce the problem? Thank you!

I guess the problem is from the incorrect application of some code checks to the output box. The output text should not be the prey of any code checkers.

@kittaakos
Copy link
Contributor

What you really need is a Chinese locale. Maybe you should try to set your OS to Chinese and then launch the IDE?

I see, thank you! I set the language in IDE2 to zh-cn, but that was not enough.

some code checks to the output box.

The output box is the same Monaco Editor you see in the IDE2. I will try to reproduce it.

@kittaakos
Copy link
Contributor

I have opened an upstream PR: eclipse-theia/theia#11615.

I will look for a temp solution for the time being.

@per1234 per1234 added the topic: theia Related to the Theia IDE framework label Aug 26, 2022
kittaakos pushed a commit that referenced this issue Aug 31, 2022
Closes #1210

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@kittaakos
Copy link
Contributor

@Silver-Fang, I have a PR with some changes. Can you please help verify whether the proposed changes fix the issue on your side?

Here is the PR: #1375

Please let me know if you do not know how GitHub Actions works or cannot download the build artifacts. You have to be logged in with your GH account to see the artifacts.

@Silver-Fang
Copy link
Author

@Silver-Fang, I have a PR with some changes. Can you please help verify whether the proposed changes fix the issue on your side?

Here is the PR: #1375

Please let me know if you do not know how GitHub Actions works or cannot download the build artifacts. You have to be logged in with your GH account to see the artifacts.

Yes, please tell my how to get the binary with your fix.

@kittaakos
Copy link
Contributor

Sure, thank you for your support on this.

  • You need a GitHub account (you have one)
  • You need to be logged in (you are),
  • Go to the PR,
  • Click on Checks,
    Screen Shot 2022-08-31 at 14 16 05
  • Click on Arduino IDE on the left:
    Screen Shot 2022-08-31 at 14 16 12
  • Scroll down to the bottom of the page and pick the artifact for your OS:
    Screen Shot 2022-08-31 at 14 16 22

Notes:

  • You cannot scroll in this area 🤦
    Screen Shot 2022-08-31 at 14 20 29
  • If for whatever reason, you cannot access and download the artifacts, let me know.

kittaakos pushed a commit that referenced this issue Aug 31, 2022
Closes #1210

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@per1234 per1234 added the conclusion: resolved Issue was resolved label Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself topic: theia Related to the Theia IDE framework type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants