-
-
Notifications
You must be signed in to change notification settings - Fork 7k
UTF-8 strings are broken, when not save sketch before compiling #4231
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
It seems to happen only in Windows (so far I was not able to get this in linux), and only with UTF-8 characters, and only when a file is not saved. The temperary file in the build.... folder is not UTF-8. |
see #4259 for more encoding issues |
"Federico Fissore" left arduino and now all "his" issues here are in the state "no one assigned" ? |
Yes it seems that's how github works. I'm sure the company is organizing itself for the after. Arduino Create also seems to be nearing general availability. |
does someone work on this issue ? |
I think the vast majority of entries are not looked into by anyone. |
any news on this ? |
Steps to reproduce:
Issue still occurs with Arduino IDE 1.8.3, Windows 7 64 bit |
This issue might be related to line 584 in arduino-core/src/processing/app/legacy/PApplet.java
Apparently OutputStreamWriter expects "UTF8", not "UTF-8" with the extra minus sign. https://docs.oracle.com/javase/tutorial/i18n/text/stream.html There's also another "UTF-8" usage on line 265 which might be worth fixing. |
Nope, just tried editing line 584, but it doesn't fix this issue. :( |
The right place to look at seems to be https://github.com/arduino/Arduino/blob/master/app/src/processing/app/SketchController.java#L660 (mostly |
I do have this issue with the Arduino IDE (1.8.5 and 1.8.7) on Windows 10. |
I can confirm, that this issue is still open at 1.8.7 on Windows 10 |
see this thread in forum:
--> http://forum.arduino.cc/index.php?topic=360932.msg2498388#msg2498388
I use 1.6.6 in a portable version on an USB-Stick (Win7 / Win 10).
I disabled the option "save when verifying or uploading"
If you are working on a file (ino, h, cpp) with UTF-8 chars in string-declarations within this file
(see "extended example" from here
--> http://forum.arduino.cc/index.php?topic=360932.msg2488750#msg2488750 ),
and you change something (it's enough to add a space char in a string),
and you DO NOT save this file before compiling and uploading,
the serial output of this UTF-8 chars (via UTF-8 capable Terminal) will be with errors.
If you save this file before compiling and uploading,
(either manually Ctrl+S or by enabling the option "save when verifying or uploading")
the serial output of this UTF-8 chars (via UTF-8 capable Terminal) will work correctly.
...
so it seems that when the IDE is compiling "from cache" (or from temp. build -folder)
there's no proper conversion or handling of UTF-8 chars on Windows OS.
The process of saving the sketch before (to a file on HDD / USB-Stick) seems to lead to a proper conversion or handling of any UTF-8 chars then ...
....
other users can reproduce this error as well
--> http://forum.arduino.cc/index.php?topic=360932.msg2499702#msg2499702
The text was updated successfully, but these errors were encountered: