1 Reply Latest reply on May 3, 2006 10:12 AM by Kagada

    special characters

    cptkirk Level 1
      I am sending an email from a flash movie and php code, this mail
      has special characters in the $body variable such as èàéö etc...
      what I receive is a bunch of code --- ex.: "élo" becomes "èlo".

      the code I'm using in the php form is

      <?php
      //
      $to = "mymail@mymail.com";
      //
      $subject = "FORM";
      //
      $headers = "MIME-Version: 1.0\r\n";
      $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
      $headers .= "X-Mailer: PHP/".phpversion()."\r\n";
      $headers .= "From: ".$mail;
      //
      $body = "Nom : ".$name;
      $body .= "\n\nFonction : ".$function;
      $body .= "\n\nCompagnie : ".$company;
      $body .= "\n\nAdresse : ".$adresse;
      $body .= "\n\nTéléphone : ".$telephone;
      $body .= "\nCourriel : ".$mail;
      $body .= "\n\nInformation : ".$info;
      $body .= "\n\n".$brochure;
      //
      if (mail($to, $subject, $body, $headers)) {
      echo "loaded=true";
      } else {
      echo "loaded=false";
      }
      //
      ?>

      Can someone help me with this
      Thanks
        • 1. Re: special characters
          Kagada
          Use UTF-8 caracter encoding to send this data. But i have found troubles with the "+" and "!" symbols with this encoding...
          Ex:

          Flash receive this string correctly
          echo(utf8_encode("Olá"));

          But this one not...

          echo(utf8_encode("2 + 2"));

          The caracter "+" is received as " " ...