I'm using IDE version 1.8.5. I'm coding "ALT + 0176" as a "degrees" sign, and I'm writing data (including that symbol) to an SD card. I've noticed that when writing to the SD card, sometimes the result is ° (as expected). But other times, it comes out as two characters, namely ° which isn't desirable.
After some experimentation, I've found the following:
- If I change all the "ALT + 0176" characters in the sketch to (the same) "ALT + 0176", then compile and upload BEFORE saving the sketch, I get ° characters.
- If I change all the "ALT + 0176" characters in the sketch to (the same) "ALT + 0176", then compile and upload AFTER saving the sketch, I get ° characters.
I know how to get the results I want, but why is it that saving a sketch alters the subsequent compile and upload's output? What's happening?
(NOTE: I experience the same problem and solution in other projects, each of which uses an 8x32 LED matrix. The erroneous output is slightly different, but the saving/not saving of the sketch works exactly the same. Saving the sketch before compiling and uploading causes unwanted results.)