pb to display special caracteres in a HTML formular (type text)

I have a short ( UNO + shield ethernet WIZNET 5100 ) code (attached) that display several HTML objects, using UTF 8 meta balise : no problems to display with Explorer text with specific car. like space, é, è,à etc…) using client.print () function => ex : client.println(F("

" + String(Nommage_client) + "


")); but I have a big problem to use an entry formular to enter some text with these specific car. => client.println (F("")); with char Nommage_client [30] ="Arduino-télé info Marcillé";

in fact, the formular display only “Arduino-télé” without the end … and if I try to modify something (remove the last “é” for ex.) the request sent is replaced by some strange cara like &A0&152 etc… in a strange way… I understand this corresponds to specific car. but I don’t know how to manage to be able to display correct caract… I have not found any trace of such problems anywhere !

has somebody an explanation and solution of course !! thks for your interest…philou35 (from france)…

gestion_formulaires_web_test.ino (4.58 KB)

but I have a big problem to use an entry formular to enter some text with these specific car. => client.println (F(""));
with char Nommage_client [30] =“Arduino-télé info Marcillé”;

Because you insist on pissing away resources using the String class. There is little performance impact sending that collection of characters using three calls to client.println(), and significant resource savings do so.

Not sure about placing +(String)Nommage_client+ in the middle of your print statement. I usually see variables inserted into returned html code like below.

client.print(F("<font color='red'><h1 align = center>"));
 client.print(Nommage_client);
client.print(F("</font> </h1> 
 <hr/>"));

Sorry but my pb is not in displaying HTML text with special caracters (é, è, etc) trough a client.println () but to display and recover same text using a form method get HTML request… :
I have tried the following but it is still the same bad working :

char Nommage_client [MAX_BUFFER] =“Arduino-télé info Marcillé”;
/…/
client.println(F("

" + String(Nommage_client) + "


")); ----------> is OK !! /..../ client.println(""); /..../ -----------> not OK !!!! result in monitor screen is : Trame en buffer_lect : GET /?NOM=Arduino-t%C3%A9l HTTP/1.1 Arduino-t%C3%A9l

I really don’t know how to solve it except making a filter on all caracters…not really nice ! has somebody a better way to fix it?

What you send to the client and what shows up on the Serial Monitor are unrelated. Why do you think that there is some relationship?

in fact, I have only resumed what is displayed on the serial monitor, when the formular is cliked on … my code detects the caracters sent by the client, and display the result of the HTML reply : in that case, the answer is : GET /?NOM=Arduino-t%C3%A9l HTTP/1.1 showing that there are indesired caracters like %C3%A91 in place of “é”…

so I don’t know how to fix this pb…
it seems that the Text type formular filters the non alpha caracteres or replace them with ù sequence…
normally, I have activated the meta balise UTF8 so the unicode car. should be accepted …
and that is the case when I use a client.print () instruction… like explained before.

the best is to test the attached code provided here to understand what is happening… (UNO compliant)

gestion_formulaires_web_test.ino (4.58 KB)

and display the result of the HTML reply : in that case, the answer is : GET /?NOM=Arduino-t%C3%A9l HTTP/1.1 showing that there are indesired caracters like %C3%A91 in place of "é"...

There is NOTHING you can do on the Arduino to influence what the client sends. It's amazing that you think you can.

sorry but I don’t understand why I can display without anyproblem any accentuated text, but not having the same working in the other hand i.e. the client cannot send accentuaded car. there is something not logical at all !
I know also that french lang. is very boring about accent too !

sorry but I don't understand why I can display without anyproblem any accentuated text,

Because the Arduino takes care of mapping the accented characters to HEX values on the way out. But, not on the way in. The NAME of a field on a form does NOT have to use accented characters. It doesn't matter if that makes the form "boring".