I have a script grab the data from database and email it in html format to the recipients.
The problems are when the data inputter input the data to the database, they may cut and paste the data from resource with different characters set.
For example, word "Flügel" may be in different character sets when input to the database.
Now when I grab data and email out. Depends on the recipient's client site email software character set up.
I can read all the "Flügel" in the content. But some people can only read some ""Flügel" and some "Flügel" turn to "Fl?gel"
Questions:
1) Say the data is input to the database from php web pages only, how can I control the character sets of data inputted to the database when the data inputter can copy and pate from any character sets resource to form's textarea?
2) If the database already have the "Flügel" in different character sets, then when I emal html, to make sure all of "Flügel" work in the html email, what should I do? htmlentities the email content before email out? (but the data inputter may already copy and paste the data being htmlentities already, then I would solve one problem here but all these data being htmlentities before would be htmlentites again, new problem!)
How do you handle it?
Thanks!