Reputation:
I have a contact page (contact.php) that sends a form (formsend.php) when people fill in the contact details.
The contact.php has:
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="ISO-8859-1">
Contact.php page is fine, displays my latin Portuguese characters fine (ã, é, etc).
But when I receive the email (when it uses formsend.php), I get the fields people signed up with messed up characters: João is João, etc.
On formsend.php I've tried adding:
$headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
and
header('Content-Type: text/html; charset=iso-8859-1');
and
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="ISO-8859-1">
as well. Nothing works.
It seems it's the formsend.php file that is failing here.
What can I do to ensure I receive properly formatted characters in the email with the user's info?
Upvotes: 0
Views: 652
Reputation: 58
Yes you may try to switch utf-8: and also do not forget to change header info header('Content-Type: text/html; charset=utf-8'); but also you need to convert user inputed text to utf-8 in this case you will have no problem... I had the same problem with Armenian...
Upvotes: 1