I have a form where spanish can be submitted and using PHP, I send an email with the data. Unfortunately, the accent marks get totally screwed up when they get emailed.
If I submit the following:
Testing Accent Marks
á
é
í
ó
ú
ñ
I end up with the following in the body of my email…
Testing Accent Marks á é à ó ú ñ
The code that is processing the email is simply placing the $_POST info directly into the body of the email. I assume I need to have htmlentities() or something but I have tried and nothing works…
I also will need to be placing the same data into a MySQL database and retrieving it later. What do I need to be aware of when I do that?
Thanks!
Drew
You have touched the fine subject of charsets. Try to create and convert everything to utf-8. Database, files, forms and the like. Look up some information on the internet about what header to use in the e-mail to make it utf-8. Also convert you e-mails from standard 7-bit to 8-bit with these headers.
For the database you need to set, in case of mysql, the collation.