"Compilation error: grpc: error while marshaling: string field contains invalid UTF-8"
hi,
im pretty new to coding and i have a problem with the compilation of my code for Arduino:
when i open the code in arduino ide and once its loaded click on verify everything compiles without errors but when i change anything e.g. put a space character somewhere(even in another file) it outputs the following error:
grpc: error while marshaling: string field contains invalid UTF-8
Compilation error: grpc: error while marshaling: string field contains invalid UTF-8
but if i now save that file with the extra space character everything compiles without errors again.
but deleting the space without saving there still is an error. although nothing changed from the saved file to the one that had the space which then was removed.
how does that make any sense?
it compiles when i delete this cpp file and try it again so i suspect it to be the problem.
i also tried pasting the code on this website but the website didnt find any non-utf8 characters: https://onlinetools.com/utf8/validate-utf8
Validate UTF8
World's simplest online utility that validates UTF8 data. Free, quick, and powerful. Import UTF8 – validate UTF8.
19 Replies
tryt hat file
also, what is your path ? Any cyrillic (non-latin1) symbols in the path?
It is a class definition for calculating a point based on a value t. I get these values from interpolating between set points before scaling the point geometricaly. I need this to make my hexapod robots leg move so it can walk.
I dont think there are any of these symbols you asked about but if there where, why arent they being picked up after saving?
what did you change? im still having the same issue
also, what is your path ? Any cyrillic (non-latin1) symbols in the path?
the path is a interpolation between points. the coords i obtaing are later proccesed by IK and written to the legs servos. i still have to implement that tho
there are no cyrillic symbols. i dont remember ever wanting to put any into my code
i got why you converted to .txt now. i think you saved it as utf8 encoding but how is this still a problem then? i switched out the files but no success.
why would these non-utf8 symbols vanish when saving and reappearing when the save version isnt the most recent eg because of placing a space and then deleting it and varifying again? i dont get how that would make sense... can you maybe tell me?
The path is shown when you compile. It is where the files exist on your hard drive.
Show the error message with verbose turned on in ide preferences
Not the path in the code.
ohh, got it. the path C:\Users\MY NAME\Documents\1. Projects\Hexapod Walking-Robot\Arduino sketches\Hexapod_Code\Final Hexapod Code\Hexapod_Code
where do i turn on that setting you told me about?

my name has a "ß" in it but that is a utf8 right?
Under preferences, but you have that enabled already.
The problem relates to your name.
how come this worked every time since i have that ide but now? it compiled fine too? what does this have to do with if the project is saved without cnageing it after or not? why did it work before that specific file was created? it worked for all these other files too?

Arduino Forum
Arduino IDE 2.3.2 & 2.3.3 always installs in C: for current user
No matter what I choose when installing Arduino IDE I always have some files on C:\Users\MyName\AppData\Local... Even if I install on disk E: (where I also have parts of Arduino IDE installed as a result) When I choose "Install for all users" I expect it to install to c:\Users\All Users, but it always installs in C:\Users\MyName I am trying ...
does my version do that too?
"No, the German letter "ß" (Eszett or sharp S) is not a Cyrillic letter" gemini saied. why is this a problem now and not all along and not even with any other files in the same directory????

Cyrillic:
This alphabet is used for languages like Russian, Ukrainian, Serbian, and Bulgarian. It has its own set of letters with different origins and sounds.
gemini also saied.
im german and i dont use these letters.
apperantly i do?


i dont understand why saving would change anything
is it saved temporarily somwhere else that does have a cyrillic letter in the path?
still, why is this a problem now but never before?
I am afraid I dont know.
When will this bug be fixed?
does sb else know maybe?
Isn't the file automatically saved when you click the compile button?
It's against the rules here to ping people like this btw.
Ohh ok sry. i thought maybe "helpers" where fine. what is the tag "community helper" for and who can use it?
ohh yes it is saved when verifying. to me this is even more confusing now.
dang, sry for wasting your time.
#include <Arduino.h>
#include <InterpolationLib.h>
class Path{ //fill in values!!!!!!!!!
private:
//constants:
//interpolation points
const static int numValues = 9;
double normal_X[numValues] = {0, 50, 58, 55, 0, -55, -58, -50, 0}; //mm from origin on x
double normal_Z[numValues] = {0, 0, 5, 20, 50, 20, 5, 0, 0}; //mm from origin on z
double normal_T[numValues] = {0, 500, 530, 570, 600, 630, 100, 1500, 2000}; //ms
double airtime_factor = 2; //factor that determines how much faster to move the legs endeffector when leg is in air(on spline path)
double max_speed = 5; //kph
thats the part of the cpp file and i wrote " static const int numValues = 9;" but not "const static int numValues = 9;" 🫣
my bad, sorry
but i would like to know what that has to do with an alleged "non-utf-8 character"