Salut,
je viens de clôturer une beta d'une librairie totalement inutile
mais lorsque je la lance, dans le serial j ai des erreurs de caractère
Exemple de message venant du serial (la vitesse de 9600 est la bonne) :
La LED int��gr��e au Arduino et li��e �� la pin 13
Pourquoi ?
Merci
@fdufnews
1 Like
terwal
December 13, 2022, 12:52pm
2
Parce que le moniteur série que tu utilise pense que c'est un jeu de caractère anglais et non Français.
Si tu écris sans anglais ou sans accent tu ne devrais plus avoir de caractère non reconnue.
Il doit aussi être possible d'indiquer au moniteur série le jeu de caractère que tu utilises?
J-M-L
December 13, 2022, 12:53pm
3
je l'ai mis sur
Run IoT and embedded projects in your browser: ESP32, Arduino, Pi Pico, and more. No installation required!
le problème ne se présente pas
peut-être un problème de codage de votre navigateur lors de l'affichage ou copier coller. il faut que ce soit en UTF8
salut,
c'est drôle car je l'ai codé sur wokwi (top du top) et en effet pas de PB
mais dans le serial de l'IDE 2 ������������������������
@terwal
Oui ce sont les accents qui bug ...mais pas tout le temps (?!).
En effet je peux supp tout les accents mais ceci ne répondrait pas à mon interrogation pourquoi
j'ai tout repassé en UTF-8 pour
mais maintenant j ai des mixes
Après avoir pass�� quelques couloirs et pièces mineures, vous arrivez dans une première salle...
@hbachetti
non pas testé
J-M-L
December 13, 2022, 1:16pm
7
ah c'est l'IDE 2.0.... le moniteur série est une vaste fumisterie. Il ne faut pas l'utiliser.
je pense que le souci que vous avez vient de ce bug
arduino:main
← palazzol:#589
opened 04:15PM - 09 Dec 22 UTC
### Motivation
Fix for #589
### Change description
Fix corruption of incomi… ng UTF8-encoded serial data
### Other information
Serial data is received in chunks. When a UTF8-encoded symbol is multibyte, it cannot be decoded properly until all the bytes are available. If an attempt at decoding is made, it will fail and the symbol for UTF-8 "Replacement Character" � is inserted into the stream. TextDecoder has a "stream" option to buffer any bytes that cannot be decoded yet, for exactly this reason. This fix creates an instance of TextDecoder which is persistent for the life of the connection, and then uses that decoder with the stream option to decode UTF8-encoded data properly.
Note - this assumes we expect UTF8 encoded data from the serial port. Generally speaking, this happens if we have the sketch editor in UTF8 mode, which appears to be the default, and then UTF8 encoded characters are included in a print() statement.
### Reviewer checklist
* [ ] PR addresses a single concern.
* [ ] The PR has no duplicates (please search among the [Pull Requests](https://github.com/arduino/arduino-ide/pulls) before creating one)
* [ ] PR title and description are properly filled.
* [ ] Docs have been added / updated (for bug fixes / features)
si vous changez le débit en Serial.begin(115200);
ça devrait moins se voir
PS; il y a pleins de soucis UTF8, par exemple
opened 02:10PM - 02 Nov 21 UTC
closed 08:01AM - 13 Dec 22 UTC
conclusion: resolved
topic: code
type: imperfection
topic: serial monitor
### Describe the problem
🐛 When Serial Monitor is used to display characters … past the ASCII range printed by a non-native USB board, corruption occurs at various non-fixed positions in the output.
### To reproduce
1. Upload a sketch that prints characters past the ASCII range to serial:
```cpp
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println("ASCII: !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
Serial.println("> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛ");
delay(200);
}
```
1. Open Serial Monitor.
🐛 Some of the characters are replaced by `�`:
```text
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡��£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»��½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓ��ÕÖ×ØÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´��¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌ��ÎÏÐÑÒÓÔÕÖ×ØÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬��¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅ��ÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦��¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿��ÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×��ÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸��º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐ��ÒÓÔÕÖ×ØÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯°±²��´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊ��ÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª��¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃ��ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤��¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½��¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕ��×ØÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶��¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎ��ÐÑÒÓÔÕÖ×ØÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯��±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ��ÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨��ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁ��ÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙ��Û
```
### Expected behavior
All characters to be printed correctly by Serial Monitor all the time:
```
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛ
```
### Arduino IDE version
#### Original report
2.0.0-beta.12-nightly.20211028
#### Last verified with
d6a4b0f (with [**serial-monitor** 0.11.0](https://github.com/arduino/serial-monitor/releases/tag/v0.11.0))
### Operating system
Windows
### Operating system version
10
### Additional context
I originally suspected the corruption might be caused by https://github.com/arduino/arduino-ide/issues/375, but this bug persists even though that one has been resolved.
---
The delay duration has an influence on the position of the corruption and the manifestation is different from one board to another (less corruption on Leonardo and MKR, more on Nano Every).
---
The issue does not occur when using the Arduino IDE 1.8.19 Serial Monitor, even when the board is running the binary that produced the corrupted output in Arduino IDE 2.x (i.e., it's not related to the sketch having been compiled in Arduino IDE 2.x).
---
Originally reported at https://forum.arduino.cc/t/serial-monitor-difficulties-with-german-umlauts/870541
---
Additional reports:
- https://github.com/arduino/arduino-ide/issues/1405
- https://forum.arduino.cc/t/serial-monitor-difficulties-with-german-umlauts/870541/7
- https://forum.arduino.cc/t/serial-read-and-serial-available-are-working-not-as-expected-in-the-code/925823
- https://forum.arduino.cc/t/using-v-2-0-serial-monitor-print/1034093
- https://forum.arduino.cc/t/question-marks-in-serial-monitor/1023531
- https://forum.arduino.cc/t/serial-monitor-detect-interferes-with-sketch-on-promicro/1017659
- https://forum.arduino.cc/t/degree-symbol-on-serial-monitor/1015370
- https://forum.arduino.cc/t/serial-monitor-produces-gibberish/950416/1
- https://forum.arduino.cc/t/serial-monitor-produces-gibberish/950416/15
- https://forum.arduino.cc/t/serial-monitor-issues-with-arduino-due/975247
- https://forum.arduino.cc/t/test-ide-2-0-rc2-the-serial-port-is-garbled/935697
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-ide/issues?q=)
- [X] I verified the problem still occurs when using the latest [nightly build](https://www.arduino.cc/en/software#nightly-builds)
- [X] My report contains all necessary details
lesept
December 13, 2022, 1:21pm
8
Les accents sont dans la version payante de l'IDE...
2 Likes
top en 115200
plus de bug
Merci bien
Alors là, elle est bien bonne.
C'est à se demander comment est bâti cet IDE 2.0.
alors je suis allé un peu vite...disons bcp moins de bug
terwal
December 13, 2022, 4:19pm
12
Sinon essaye Visual code, il y a moins d'intérêt depuis la sortie du 2.0, mais c'est pas mal, avec pas mal de fonctionnalité plus ou moins évolué d'un éditeur de code
merci terwal
Je l'utilise aussi
Mais je suis surtout passé à wokwi qui est terrible pour les projet Arduino.
Ce projet est un peu une blague car c'est un simulateur de donjon fait pour Arduino
avec la version eng ce sera plus simple
J-M-L
December 13, 2022, 5:23pm
14
En fait les octets arrivent lentement et le terminal essaye de les décoder pour affichage mais pour certains codes UTF8 Qui sont sur plusieurs octets , il lui manque une partie du code et donc il affiche le point d’interrogation… Avec un débit plus élevé le timeout n’est pas déclenché (ou moins souvent) et le bon caractère UTF8 est affiché
il y a un fix en cours…
system
Closed
June 11, 2023, 5:23pm
15
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.