Report Bugs Here

Moderator: Mmiscool

User avatar
By aphawk
#55462 Livetv,

I find the problem....

Arduino IDE and the gcc - compiler uses UTF8 .... this means that some ASCII codes are replaced by 2 or 3 bytes sequences !

And this is exactly the characters I have received in my browser......

Maybe if the pages are put in the web using UTF8 charset, the problem can be resolved for Web output ?

But for the Oled and TFT, must be written some routine that intercepts the bytes, analize then, and replace for the original ASCII code and find the correct Font Table code to show as it must be showed ?
User avatar
By raintime
#55464 I have the same bug. I put in &nbsp in the places where I want a few spaces between words, and everything works great. But later, all my &nbsp's have been changed to some strange A with a dot on top, and the &nbsp's are all gone from my file!

I have to manually go in and put back all my &nbsp's, which helps for a while, but then they go away again!

It would be great if the &nbsp's stayed around!
User avatar
By livetv
#55473 @aphawk

Yes, I think you got it. I think you're right about web output too. In my perusal of ESPbasic source code, I haven't yet found where headers are generated for HTML output to the browser. By adding a META tag to specify character set, you should be able to solve your problem. Maybe in CSS? Might be easier than that. Maybe ESPbasic doesn't even send headers and you can do this:

wprint "<head><meta (add your character set definition here) ></head>"

But what of the OLED/TFT issue? That's a little beyond me.


@raintime

I think the patch I mentioned earlier in this thread will take care of the disappearing &nbsp; but the cryptic characters that show up once in a while have me stumped. That shouldn't happen and it leads me to believe there is more afoot. I'll have to try and replicate this.
User avatar
By aphawk
#55478 livetv,

Sorry for I'm abusing your god will ....but I don't have any skills in C++ languages, I only program today in Basic and AVR Assembler.

I found one post that indicate the problem, and the author put one decode routine to correct this problem, searching for the two or three bytes, and sending the original character that originate the two or three bytes sequence.

See this post :

http://playground.arduino.cc/Main/Utf8ascii

The problem I have is that the same problem happens when sending to Web screen AND sending to one Oled Display or TFT display.

I think that there is one routine in Arduino IDE that receives all text output and send it to the device selected.

If this routine can be intercepted, with an decode routine like that, is possible to send the correct character only, using the font table for the Oled or the TFT .

Thanks a lot for your help.