I'm trying to setup the ESP8266 as a mini webserver specificlaly to control a small deivce. Everything is generally working well.
But I have a problem in the following code.
Just a bit of background, the webpage has just a few controls on it (buttons and labels mainly) and one input time field. I'd like to set the default for this to what has been set previously and is stored in the ESP8266 (I have to do it this way rather than using the client as there could be multiple clients). I'm using the window.onload to do this (there may be other ways)
The first code snippet works fine, but the second doesn't. I suspect it is something to do with UTF-8 (I believe B4R uses) v. UTF-16 (I beleive HTML pages use)
Could someone confirm that it is to do with the UTF coding or offer any other cause/solution, and if it is to do with UTF coding, is there a routine anywhere that would convert from UTF-8 to UTF-16.
B4R strings are different than in other B4X tools. The reasons for these differences are: 1. Very limited memory. 2. Lack of Unicode encoders. A String object in B4R is the same as C char* string. It is an array of bytes with an additional zero byte at the end. The requirement of the last zero...
B4R strings are different than in other B4X tools. The reasons for these differences are: 1. Very limited memory. 2. Lack of Unicode encoders. A String object in B4R is the same as C char* string. It is an array of bytes with an additional zero byte at the end. The requirement of the last zero...
I do get that, but I was just trying to do a direct comparison between a constant string that the HTML expects and works, and a variable string set up as a constant that doesn't work.
Ultimately, the FeedTimeString would be replaced with a value, which would need to be in bytes as a variable.
Thanks, that did it. But, I'm sure I tried using single quotes, albeit in a single write.write.write format, without success. But, in trying to get it working, I may have messed something else up along the ways.
Nice just to be brought back down to earth, and think straight again after a simple prompt.
One can sometimes make things a whole lot more complicated than they need to be.