-
-
Notifications
You must be signed in to change notification settings - Fork 430
Serial monitor character encoding option #1728
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
Comments
Problem identified in 2014 with editor arduino/Arduino#2430, but May 2015 comment contains reference to limitation with serial monitor encoding support |
I did some research on UTF-8 behavior today. I found this code in
The I think the standard should be to always use UTF-8. So a sketch developed and programmed on a Mac works with a Linux or Windows box and vice versa. If we later want to add HEX display, as proposed by #1727, here would be one place to do it. There is a catch here: In our context, there is no guarantee whatsoever that the bytes that come in do us the favor to split neatly at character boundaries. It is quite feasible they include only the first byte of a character that is encoded into several bytes, and the other bytes come later, with the next call. In this case, the In actual tests, I indeed see erratic output whenever I use non-ASCII characters in my sketches. Sometimes it works, sometimes it doesn't. (This is Linux, and I'm almost certain the platform encoding is UTF-8.) The I think that's good advice. This would give control over the encoding used. Clean UTF-8 decoding even in the split character case is a feature included in |
Hi, |
- Add "send as <encoding>" dropdown menu. - Add "receive as <encoding>" dropdown menu. Sending and receiving can be done in any encoding specified in StandardCharsets with the additional option to send comma-separated bytes and receive newline-separated bytes directly. This fixes #4452 and offers an easy implementation for issue #4632.
- Add "send as <encoding>" dropdown menu. - Add "receive as <encoding>" dropdown menu. Sending and receiving can be done in any encoding specified in StandardCharsets with the additional option to send comma-separated bytes and receive newline-separated bytes directly. This fixes #4452 and offers an easy implementation for issue #4632.
- Add "send as <encoding>" dropdown menu. - Add "receive as <encoding>" dropdown menu. Sending and receiving can be done in any encoding specified in StandardCharsets with the additional option to send comma-separated bytes and receive newline-separated bytes directly. This fixes #4452 and offers an easy implementation for issue #4632.
Describe the request
It would be great if in the serial monitor had an option to change the encoding used.
In my case, my sketches are using UTF-8, so print messages use that encoding. By default, serial monitor is using ISO-8859 (probably the default one of Windows 7), so those print messages are not shown properly:
Additional context
I've found other issues talking about this problem. Instead of detecting the encoding used, it might be easier if the user could select the charset he wants to use. The option (a selectable list with the most used character sets) may be put in the bottom right corner, left of the two existing selects (baud rate and line feed).
Additional requests:
The text was updated successfully, but these errors were encountered: