Open Sarah-C opened 3 years ago
Hey.
Please check your encoding. It seems like there is some text encoding issues in your file. Did you opened the file in an another editor, than the Arduino IDE?
Hiyah!
I didn't open it in anything other than Arduino IDE, the sequence was: downloaded the .zip to my download folder, opened it via windows (built in .zip program), dragged out main folder and clicked open the .ino file which opened it in the Windows Arduino 1.8.15 editor.
I'll investigate, and download the zip again.
-time passes-
I've confirmed it's in the downloaded file: ani.h
ani.h is recognised by Notepad++ as UTF-8-BOM, and the other two files as UTF-8.
I opened ani.h in HxD, and sure enough, the file starts with the "byte order mark "EFBBBF". EF BB BF 69 6E 74 20 66 72 61 6D 65 73 3D 31 33
To correct it in Arduino 1.8.15 editor, I clicked the ani.h file tab, and pressed the cursor right key until the "i" in the very first "int" was passed. I then deleted several times (more than x3) as it deletes the invisible characters that way, and re-typed the "i". Once saved, the compiler no longer complained.
I'm at a loss as to why only the downloaded version is like this and you don't see it - but it may come in useful for others who have the same issue.
I've found the Arduino issue too: https://github.com/arduino/Arduino/issues/2092
It's a "Wont fix" - BOM is old and they don't expect to see it in files anymore, they call it "garbage". ( "The IETF recommends that if a protocol either (a) always uses UTF-8, or (b) has some other way to indicate what encoding is being used, then it "SHOULD forbid use of U+FEFF as a signature." ") https://en.wikipedia.org/wiki/Byte_order_mark =)
Hello Sarah, I had the identical issue and let Danko (Velos Projects) know about it just a few mins before I read your posts . I will try to fixit with the technique as you suggest immediately above. I asked if he could but he no longer has the hardware or time..
I'll let you know here if I can get the ani.h corruption resolved.. Thanks for posting this .. mean while I commented the a.i.h load section out and got this ( see image below) after I also swapped the Day/ Month display positions
Well I tried editing the ani.h file in my Arduino IDE 2.1.0 editor and then again using Notepad++ but could not figure out how to do your suggestion: "..opened ani.h in HxD, and sure enough, the file starts with the "byte order mark "EFBBBF". EF BB BF 69 6E 74 20 66 72 61 6D 65 73 3D 31 33 " ..
I see the EFBBF but .. don't yet know how to use the Hex Editor in Notepad++ to convert a UTF-8-BOM, and make it a UTF-8."
SO, I haven't fixed it yet.. :(
Would you be so kind as to Attach the corrected version of ani.h here immediately below ? I'd like to see if I can retrieve and try it to restore the animation.. since I cant seem to edit/fixit myself in Notepad++
Sorry for the delay, I've been doing some 3DS fiddling!
The display looks good!
I've had a look on my laptop and found the only instance of the file is this ASCII version... let me know how it goes.
It SHOULD be completely fine, and not cause the compiler to complain, it's good old ascii after all. I've confirmed it compiles "on my machine" too.
(Github doesn't like .h files, so I zipped it!) ani.zip
I see the EFBBF but .. don't yet know how to use the Hex Editor in Notepad++ to convert a UTF-8-BOM, and make it a UTF-8."
Oh, sorry for the confusion - I used the free hex editor "HxD" (unrelated to Notepad++) and typed the hex values in the relevant column. (it has decimal, hex, and ascii columns) https://mh-nexus.de/en/downloads.php?product=HxD20
I too was unsuccessful trying to do it with Notepad++ .
Thanks Sarah I’ll try it soonest..
From: Sarah Cartwright @.> Sent: Tuesday, June 27, 2023 10:09 AM To: VolosR/ClockM5Stick @.> Cc: jims1234 @.>; Comment @.> Subject: Re: [VolosR/ClockM5Stick] Compile error. (#1)
Sorry for the delay, I've been doing some 3DS fiddling!
I've had a look on my laptop and found the only instance of the file is this ASCII version... let me know how it goes.
It SHOULD be completely fine, and not cause the compiler to complain, it's good old ascii after all. I've confirmed it compiles "on my machine" too.
(Github doesn't like .h files, so I zipped it!) ani.zip https://github.com/VolosR/ClockM5Stick/files/11885376/ani.zip
— Reply to this email directly, view it on GitHub https://github.com/VolosR/ClockM5Stick/issues/1#issuecomment-1609917596 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADETVWFO6SEZD2UR5NLKXALXNMHTRANCNFSM5EDBEVZQ . You are receiving this because you commented.Message ID: @.***>
if you still have this issue, can I suggest that you open the file in Notepad++ and change the encoding (on menu) to UTF-8 and save this removes the erroneous item. Found this via google.
I'm getting this when I compile the code:
In file included from C:\Users\sarah\Documents\Arduino\sketches\M5StickPlusC\ClockM5Stick\ClockM5Stick.ino:5:0: ani.h:1:1: error: stray '\357' in program int frames=132; ^ ani.h:1:1: error: stray '\273' in program ani.h:1:1: error: stray '\277' in program