Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: encoding when reading a cloud sketch #1910

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

Merged
kittaakos merged 1 commit into main from #634
Mar 2, 2023
Merged

fix: encoding when reading a cloud sketch #1910

kittaakos merged 1 commit into main from #634
Mar 2, 2023

Conversation

Copy link
Contributor

@kittaakos kittaakos commented Feb 22, 2023
edited
Loading

Motivation

Change description

Other information

Steps to verify:

  • Import the sketch_feb14c.zip sketch to https://create.arduino.cc/editor/,
  • Open IDE2, log in, and pull the previously imported sketch from the cloud.
  • IDE2 does not crash, and the encoding is correct in the main sketch file.
  • Use the "arduino.sketchbook.showAllFiles": true settings, open the .log files from the sketch folder in an editor, and copy the below content to the top of the log files. Save your editors if auto-save is not on. Do the same with the ReadMe.adoc. Push your sketch to the cloud and verify that the new content is available online:
 //❤️🔥
 Serial.println( "examples of normal 1-byte-chars:");
 Serial.println( "---------------------------------");
 Serial.println( "! \" # $ % & ' ( ) * + , - . / ");
 Serial.println( "[ \\ ] ^ _ ` { | } ~"); 
 Serial.println(); 
 Serial.println( "examples of (windows-compatible) 2-byte-chars:");
 Serial.println( "---------------------------------");
 Serial.println( "¡ ¢ £ ¤ \ ¦ § ̈ © a « ¬ ­ ® ̄ ° ± 2 3 ́ μ ¶ · ̧ 1 o » 1⁄4 1⁄2 3⁄4 ¿");
 Serial.println( "Ä ä Ö ö Ü ü ß ç ñ ò ó ô õ ÷ ø ù ú û ý þ ÿ");
 Serial.println( "Ā ā Ă ă Ą ą Ć ć Ĉ ĉ Ċ ċ Č č Ď ď Đ đ Ē ē Ĕ ĕ Ė ė Ę");
 Serial.println( "т у ф х ц ч ш щ ъ ы ь э ю я ѐ ё ђ ѓ є ѕ і ї ј љ њ ћ ќ ѝ ў џ Ѡ ѡ"); 
 Serial.println(); 
 Serial.println( "examples of (windows-compatible) 3-byte-chars:");
 Serial.println( "---------------------------------");
 Serial.println( "ᄀ ᄁ ᄂ ᄃ ᄄ ᄅ ᄆ ᄇ ᄈ ᄉ ᄊ ᄋ ᄌ ᄍ ᄎ ᄏ ᄐ ᄑ ᄒ ᄓ ᄔ ᄕ ᄖ"); 
 Serial.println( "Ꭰ Ꭱ Ꭲ Ꭳ Ꭴ Ꭵ Ꭶ Ꭷ Ꭸ Ꭹ Ꭺ Ꭻ Ꭼ Ꭽ Ꭾ Ꭿ Ꮀ Ꮁ Ꮂ Ꮃ Ꮄ Ꮅ Ꮆ Ꮇ Ꮈ");
 Serial.println( "€ ₭ ₮ ₯ ₰ ₱ ₲ ₳ ₴ ₵ ₸ ₹ ₺ ¢ £ ¬ ̄ ¦ \ ₩ │ ← ↑ → ↓ しかく しろまる"); 
 Serial.println(); 
 Serial.println( "examples of (windows-compatible) 4-byte-chars:");
 Serial.println( "---------------------------------");
// Serial.println( "\xf0\x90\x90\x80");
// Serial.println( "𐐀 𐐁 𐐂 𐐃 𐐄 𐐅 𐐆 𐐇 𐐈 𐐉 𐐊 𐐋 𐐌 𐐍 𐐎 𐐏 𐐐 𐐑 𐐒 𐐓 𐐔 𐐕 𐐖 𐐗 𐐘");
// Serial.println( "𐐙 𐐚 𐐛 𐐜 𐐝 𐐞 𐐟 𐐠 𐐡 𐐢 𐐣 𐐤 𐐥 𐐦 𐐧 𐐨 𐐩 𐐪 𐐫 𐐬 𐐭 𐐮 𐐯 𐐰 𐐱");
// Serial.println( "𐐲 𐐳 𐐴 𐐵 𐐶 𐐷 𐐸 𐐹 𐐺 𐐻 𐐼 𐐽 𐐾 𐐿 𐑀 𐑁 𐑂 𐑃 𐑄 𐑅 𐑆 𐑇 𐑈 𐑉 𐑊");
// Serial.println( "𐑋 𐑌 𐑍 𐑎 𐑏 𐒀 𐒁 𐒂 𐒃 𐒄 𐒅 𐒆 𐒇 𐒈 𐒉 𐒊 𐒋 𐒌 𐒍 𐒎 𐒏 𐒐 𐒑 𐒒 𐒓");
// Serial.println( "𐒔 𐒕 𐒖 𐒗 𐒘 𐒙 𐒚 𐒛 𐒜 𐒝 𐒠 𐒡 𐒢 𐒣 𐒤 𐒥 𐒦 𐒧 𐒨 𐒩");

Closes #449
Closes #634

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

@kittaakos kittaakos added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Feb 22, 2023
@kittaakos kittaakos self-assigned this Feb 22, 2023
Closes #449
Closes #634
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@kittaakos kittaakos marked this pull request as ready for review February 23, 2023 14:18
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I verified it fixes #634 and #449.

Thanks Akos!

Copy link
Contributor

@AlbyIanna AlbyIanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me! 💪

@kittaakos kittaakos merged commit 7721350 into main Mar 2, 2023
@kittaakos kittaakos deleted the #634 branch March 2, 2023 08:48
@per1234 per1234 added the topic: cloud Related to Arduino Cloud and cloud sketches label Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@per1234 per1234 per1234 approved these changes

+1 more reviewer

@AlbyIanna AlbyIanna AlbyIanna approved these changes

Reviewers whose approvals may not affect merge requirements
Labels
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
Milestone
No milestone

AltStyle によって変換されたページ (->オリジナル) /