On one site, the site is on iso-8859-1, database is on latin1

I send the email using the header

$headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\n";

I can read these emails fine.

Plus, when I receive email which is either on iso-8859-1 or utf8 from different senders, I can read all these "úőűáóüöí" characters in the emails well.

But some email recipients use utf character set at the client's side said they can not read the "úőűáóüöí" sent from the php site on iso-8859-1.

My questions are
1) what is their desktop computer set up problem? what they can do to be able to read "úőűáóüöí" in emails of charset "iso-8859-1" or "utf8" (I can read both)?

2) if my database is on utf8, my web page is utf8 and the email that my php script sent out is on utf8, will some other clients whose desktop are on iso-8859-1 will complain too that they cannot read "úőűáóüöí" in emails which is utf8 charset?

in simple words, email charset either "iso-8859-1" or "utf8", none of them will be able to satisfy all the recipients, in terms of reading "úőűáóüöí", due to their desktop set up are different? if that is the case, what is your solution?

or "utf8" will be able to satisfy all the recipients?

Thanks!

    In simple words, how should I set up the email encoding

    $headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\n";

    or

    $headers .= "Content-Type: text/html; charset=\"urf8\"\n";

    so the European characters in my html format email can be read by all email recipients no matter their desktop set up is utf8 or latin etc.?

      Could this be the solution to make email/content/data encoding on charset ISO-8859-1 or latin1 to work with the platform encoding on charset utf8? and vice versa.

      Say I have html format value sent from charset ISO-8859-1 site to UTF8 site or utf8 email client.

      I can use

      $value=htmlspecialchars_decode(htmlentities($value));

      htmlentities will Convert all applicable characters to HTML entities.
      htmlspecialchars_decode — Convert special HTML entities back to characters.

      $value=htmlspecialchars_decode(htmlentities($value));

      Will keep the html format tags etc. as it was before and covert the other characters such as these special European characters to html entities.

      Say the old $value is encoding on latin1, now the new $value could be displayable on UTF8 web pages.

        in mail, you should use:
        $headers .= "Content-Type: text/html; charset=\"iso-8859-2\"\n";
        encoding, if you're using ő character. In latin1(iso-8859-1) this character replaced to ?

        it takes a long time while i found the way to send mails and visible pages for central european pages. where i used utf8 fully, there was diffferences in browser char code recognitions.

        double html entities converts not suggested. And in database you will find latin2 collation.

          Write a Reply...