Skip to content

Text copied from from Serial Monitor has missing line endings #730

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

Closed
per1234 opened this issue Dec 31, 2021 · 2 comments
Closed

Text copied from from Serial Monitor has missing line endings #730

per1234 opened this issue Dec 31, 2021 · 2 comments
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself topic: serial monitor Related to the Serial Monitor type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Dec 31, 2021

Describe the bug

It is sometimes useful to copy the text that was printed by an Arduino board to Serial Monitor. For example, I sometimes copy CSV-style data into a spreadsheet program when I want to do further manipulation and analysis.

🐛 This is currently not possible to do with any multi-line text because the copied content has missing (or perhaps non-standard) line endings.

To Reproduce

  1. Upload a sketch that prints multiple lines of text to serial:
    void setup() {
      Serial.begin(9600);
    }
    void loop() {
      Serial.println("hello");
      delay(1000);
    }
  2. Open the Serial Monitor view in the Arduino IDE (Tools > Serial Monitor).
  3. Select multiple lines of the text that was printed in the Serial Monitor view.
  4. Paste it into a text editor or spreadsheet program.
    🐛 The line endings are not present:
    hellohellohello
    

Expected behavior

Text copied from Serial Monitor has standard line endings.

Arduino IDE version

2.0.0-rc3

Operating system

Windows, Linux

Operating system version

Windows 10, Ubuntu 20.04

Additional context

After copying the following Serial Monitor output:

a
a
a

This command reveals that there are no line endings:

$ xclip -selection clipboard -out | xxd -p

616161

I'm not sure why, but I do get line breaks when I paste the text to the Arduino Forum (Discourse) composer field. In that case, the problem is opposite because I get double spaced text.

But when pasting to VS Code, Notepad++, LibreOffice Calc, GitHub comment field, etc., even a fenced code block on the forum, I get no line breaks.


Related:


Originally reported at:

@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project topic: serial monitor Related to the Serial Monitor labels Dec 31, 2021
@KurtE
Copy link

KurtE commented Feb 3, 2022

I just started playing with the IDE 2 and ran into this as well.

This happens with Teensy Micromod connected as hardware COM Port COM115. Will try it again once the plugable Serial monitor code is working and using the Teensy specific plugin.

@per1234 per1234 changed the title Text copied from from Serial Monitor has missing or non-standard line endings Text copied from from Serial Monitor has missing line endings Jun 21, 2022
@per1234
Copy link
Contributor Author

per1234 commented Jun 22, 2022

Fixed by #943

@per1234 per1234 closed this as completed Jun 22, 2022
@per1234 per1234 added the conclusion: resolved Issue was resolved label Jun 22, 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: serial monitor Related to the Serial Monitor type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

3 participants