Now I have learned something. There is a reason they made String!
Okay, my big problem was Ethernetshield-related. I tried another and it worked fine, but at that point had I already started migrating from String.
I need help with this:
I converted my SWE-function (see above) to live without String. Now it looks like this, and relies on a replace-function found with Google.
void SWE( char * in ) { // Translate characters to the web client
replace(in, "å", "å");
replace(in, "ä", "ä");
replace(in, "ö", "&oring;");
replace(in, "Å", "Å");
replace(in, "Ä", "Ä");
replace(in, "Ö", "&Oring;");
replace(in, "º", "°");
replace(in, "°", "°");
}
Using it, I can convert char arrays. Great if they are variables.
But I can't convert this:
client.println("
");
To get around this problem I tried to put client.println() into the SWE-function, but it did not work.
Then I tried to use a pointer to it, but I can not make it compile "C.println(in);". I get the error "request for member 'println' in 'C', which is of non-class type 'EthernetClient*' ":
..
//Where I send html to the client
SWE("
", recTemp);
..
void SWE( char * in, EthernetClient * C ) { // Translate characters to the web client
replace(in, "å", "å");
replace(in, "ä", "ä");
replace(in, "ö", "&oring;");
replace(in, "Å", "Å");
replace(in, "Ä", "Ä");
replace(in, "Ö", "&Oring;");
replace(in, "º", "°");
replace(in, "°", "°");
C.println(in);
}
Any ideas? Later, I would like to move the HTML to an SD card. That must have been done before? Perhaps with some functionality to put in variable values?