Welcome to the Treehouse Community
Looking to learn something new?
Andraž Lazi?3,130 Points
Strange characters in email. How to correct that in this particular example?
When the form is submited the email subject and also the content have strange characters (like: PovpraÅ¡evanje | ÄŒofot Ä ikor). I am not using English. How to fix traht problem?
Because its not english, you can try to parse it through some function like =>
utf8_decode(' strings ') htmlentities(' stings ') html_entity_decode(' string' )
I am not sure what you are trying to do, but hopefully may work out for you
Maybe somewhere you mention that has the parsing error, was it subject and contents? I would try something like this.
$subject = "Shirts 4 Mike Contact Form Submisstion |" . $name; $mail-> Subject = utf8_decode($subject); $mail-> MsgHTML(utf8_decode($email_body));
That should parse any strange characters in your email. I hope that works.