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

UFT-8 multibyte characters are broken when using the "Pull" function on your Remote Sketchbook #449

Closed
3 tasks done
BlackBrix opened this issue Jul 12, 2021 · 2 comments · Fixed by #1910
Closed
3 tasks done
Assignees
Labels
conclusion: resolved Issue was resolved topic: cloud Related to Arduino Cloud and cloud sketches topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@BlackBrix
Copy link

BlackBrix commented Jul 12, 2021

Describe the problem

When you do a "Pull" on a file in your Remote Sketchbook that contains UTF-8 multibyte characters, these characters are not displayed correct in Arduino IDE.

To reproduce

  1. Create a sketch in Arduino Web Editor that contains UFT-8 multibyte characters.
    Here's my shared one as an example: https://create.arduino.cc/editor/Dirk67/d86881f0-faf3-48cd-8097-ce9915bb1ca0/preview .
  2. Sync Remote Sketchbook in Arduino IDE.
  3. Pull the sketch you created in step 1.
  4. Open this sketch in Arduino IDE
  5. Compare the display of the UFT-8 multibyte characters within Arduino IDE to the characters as they are displayed in "Arduino Web Editor".

image

Expected behavior

UFT-8 multibyte characters, should always display correctly.

Arduino IDE version

2.0.0-beta.9

Operating system

Windows

Operating system version

10

Additional context

Additional reports:

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@cmaglie cmaglie removed the type: bug label Sep 16, 2021
@rsora rsora added the type: imperfection Perceived defect in any part of project label Sep 22, 2021
@per1234 per1234 added the topic: code Related to content of the project itself label Oct 24, 2021
@per1234 per1234 changed the title UTF8-multibyte-characters are broken when using the "Pull" function on your Remote Sketchbook UFT-8 multibyte characters are broken when using the "Pull" function on your Remote Sketchbook Feb 10, 2023
@kittaakos
Copy link
Contributor

Quality bug report 🙏 Thank you!

This issue is related to #634, at least on the code level, and will be fixed soon.

After the fix, IDE2 can show all the characters for a sketch pulled from the cloud:

Screen Shot 2023-02-22 at 15 42 07


Does IDE2 want to highlight the invisible, ambiguous, and non-basic ASCII characters in the editor (leave as is) or hide them as IDE2 did for the output (#1375)

Currently, it's like this:

449.mp4

What's your opinion on this, @per1234? Thank you!

@kittaakos kittaakos assigned kittaakos and unassigned fstasi Feb 22, 2023
kittaakos pushed a commit that referenced this issue Feb 22, 2023
Closes #449
Closes #634

Signed-off-by: Akos Kitta <[email protected]>
@per1234
Copy link
Contributor

per1234 commented Feb 22, 2023

What's your opinion on this, @per1234?

I think it is a very useful feature. It is common to see forum posts from people asking for help with cryptic compilation errors like:

C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:3:16: error: stray '\342' in program
   Serial.print(“don’t use smart quotes in code”);
                ^
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:3:17: error: stray '\200' in program
   Serial.print(“don’t use smart quotes in code”);
                 ^
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:3:18: error: stray '\234' in program
   Serial.print(“don’t use smart quotes in code”);
                  ^
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:3:22: error: stray '\342' in program
   Serial.print(“don’t use smart quotes in code”);
                      ^
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:3:23: error: stray '\200' in program
   Serial.print(“don’t use smart quotes in code”);
                       ^
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:3:24: error: stray '\231' in program
   Serial.print(“don’t use smart quotes in code”);
                        ^
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:3:51: error: stray '\342' in program
   Serial.print(“don’t use smart quotes in code”);
                                                   ^
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:3:52: error: stray '\200' in program
   Serial.print(“don’t use smart quotes in code”);
                                                    ^
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:3:53: error: stray '\235' in program
   Serial.print(“don’t use smart quotes in code”);
                                                     ^
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:4:18: error: stray '\342' in program
   Serial.println(‘!’);
                  ^
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:4:19: error: stray '\200' in program
   Serial.println(‘!’);
                   ^
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:4:20: error: stray '\230' in program
   Serial.println(‘!’);
                    ^
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:4:22: error: stray '\342' in program
   Serial.println(‘!’);
                      ^
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:4:23: error: stray '\200' in program
   Serial.println(‘!’);
                       ^
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:4:24: error: stray '\231' in program
   Serial.println(‘!’);
                        ^
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino: In function 'void setup()':
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:3:19: error: 'don' was not declared in this scope
   Serial.print(“don’t use smart quotes in code”);
                   ^~~
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:3:19: note: suggested alternative: 'tone'
   Serial.print(“don’t use smart quotes in code”);
                   ^~~
                   tone
C:\Users\per\Documents\Arduino\sketch_feb21a\sketch_feb21a.ino:4:25: error: expected primary-expression before ')' token
   Serial.println(‘!’);
                         ^

This is caused by website software or word processors prettying up code text by doing things like replacing correct straight quotes with "smart quotes".

So I would leave the feature enabled, but we can consider refining the default "Unicode Highlight" settings if we see indications that specific aspects of the current settings are producing a poor UX. Unfortunately I see that the most common culprit: the curved double quote is not even highlighted with the current defaults.

kittaakos pushed a commit that referenced this issue Feb 23, 2023
Closes #449
Closes #634

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Feb 23, 2023
Closes #449
Closes #634

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Feb 24, 2023
Closes #449
Closes #634

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Mar 2, 2023
Closes #449
Closes #634

Signed-off-by: Akos Kitta <[email protected]>
@per1234 per1234 added the conclusion: resolved Issue was resolved label Mar 3, 2023
kittaakos pushed a commit that referenced this issue Mar 9, 2023
Closes #449
Closes #634

Signed-off-by: Akos Kitta <[email protected]>
@per1234 per1234 added the topic: cloud Related to Arduino Cloud and cloud sketches label Mar 6, 2024
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: cloud Related to Arduino Cloud and cloud sketches topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants