-
-
Notifications
You must be signed in to change notification settings - Fork 474
Closed as not planned
Labels
conclusion: duplicateHas already been submittedHas already been submittedtopic: codeRelated to content of the project itselfRelated to content of the project itselftopic: serial monitorRelated to the Serial MonitorRelated to the Serial Monitortype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project
Description
Describe the problem
When using serial printing accented characters or ASCII higher than 127, the serial monitor mostly shows a "�", but not always.
To reproduce
Serial.print
accented characters or ASCII with values higher than 127.
E.g.:
Serial.print("Humidité: ");
Serial.print(h);
Serial.print(("% Température: "));
Serial.print(t);
Serial.print(("° C "));
Serial.print(("Humidex : "));
Serial.print(humidex);
Serial.println(("° C "));
Expected behavior
The serial monitor should show the characters in the right encoding or at least UTF-8.
Arduino IDE version
2.0.0-rc9.3
Operating system
Windows
Operating system version
11
Additional context
Full code example :
#include <DHT.h>
// Broche de données
#define DHTPIN 2
// Type de capteur pour la librairie
#define DHTTYPE DHT11 // DHT 11
// Déclaration de l'objet
DHT dht(DHTPIN, DHTTYPE);
long currentTime = 0;
long dhtPrevious = 0;
long dhtDelay = 1000;
void setup() {
Serial.begin(9600);
Serial.println(F("DHTxx test!"));
dht.begin(); // Initialisation
currentTime = millis();
}
void loop() {
currentTime = millis();
if (currentTime - dhtPrevious >= dhtDelay) {
dhtPrevious = currentTime;
float h = dht.readHumidity();
float t = dht.readTemperature();
float humidex = dht.computeHeatIndex(t, h, false);
Serial.print("Humidité: ");
Serial.print(h);
Serial.print(("% Température: "));
Serial.print(t);
Serial.print(("° C "));
Serial.print(("Humidex : "));
Serial.print(humidex);
Serial.println(("° C "));
}
}
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
Metadata
Metadata
Assignees
Labels
conclusion: duplicateHas already been submittedHas already been submittedtopic: codeRelated to content of the project itselfRelated to content of the project itselftopic: serial monitorRelated to the Serial MonitorRelated to the Serial Monitortype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project