Skip to content

'\t' sent to Serial Monitor are converted to single space #675

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
ermtl opened this issue Dec 10, 2021 · 1 comment · Fixed by #943
Closed

'\t' sent to Serial Monitor are converted to single space #675

ermtl opened this issue Dec 10, 2021 · 1 comment · Fixed by #943
Assignees
Labels
conclusion: resolved Issue was resolved criticality: high Of high impact 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

@ermtl
Copy link

ermtl commented Dec 10, 2021

In previous versions (up to Arduino 1.8x), sending a /t tab character to the serial monitor resulted in an aligned output (8 character tab spacing)

Exemple

int value1=11;
int value2=22;
int value3=33;
Serial.print("\tParameter 1\tParameter 2\tParameter 3\n");
Serial.print("\t");
Serial.print(value1);
Serial.print("\t\t");
Serial.print(value2);
Serial.print("\t\t");
Serial.println(value3);

in previous versions, the output would look like this

        Parameter 1     Parameter 2     Parameter 3
        11              22              33

In Arduino 2, it looks like this :

Parameter 1 Parameter 2 Parameter 3
11 22 33

The \t character is replaced by a space (except as the first character of a line where it produces no output).

This makes tables and aligned data difficult to read as proper formatting is lost.

I tested this on Linux Mint 20.2

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

per1234 commented Dec 10, 2021

Thanks for your report @ermtl

I am not able to reproduce the issue with Arduino IDE 2.0.0-beta.11, but I am able to reproduce it with 2.0.0-beta.12 and onward.

So I'm certain it was introduced by #524, as with the similar #535

@per1234 per1234 changed the title /t tab character sent to Serial monitor interpreted as space '\t' sent to Serial Monitor are converted to single space Jan 27, 2022
@ubidefeo ubidefeo added the criticality: high Of high impact label Mar 24, 2022
@ubidefeo ubidefeo assigned ubidefeo and unassigned fstasi Apr 6, 2022
@per1234 per1234 added the conclusion: resolved Issue was resolved label Apr 6, 2022
@AlbyIanna AlbyIanna reopened this Apr 7, 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 criticality: high Of high impact 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

Successfully merging a pull request may close this issue.

5 participants