selbekk Posted December 2, 2008 Share Posted December 2, 2008 hey there.. i am making a mail script, and for some reason, I can't seem to show æ, ø and å (nordic letters) in my mails.. it just shows up as ø or Ã¥ and what not. I have some headers that makes it a html mail (see code for reference). It works in the subject field, but not in the message. I just want it to work <?php $mail = stripslashes($_POST['mail']); $name = stripslashes($_POST['name']); $msg = stripslashes($_POST['message']); $order = $_POST['order']; $sentMsg = $order ."<br /> Melding: ". $msg; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1; \r\n"; $headers .= "From: $name <$mail>" . "\r\n"; $send_the_mail = @mail("[email protected]", "Prisforespørsel fra Proffkort.no", $sentMsg, $headers) or die ("Kan ikke sende mail!"); echo $send_the_mail ? "Mail er sendt! <br />" : "Mail ble ikke sendt! <br />"; echo '<p><a href="javascript:window.opener=\'x\';window.close();">Klikk her for å lukke vinduet</a></p></body></html>'; ?> Link to comment https://forums.phpfreaks.com/topic/135178-solved-no-%C3%A6-%C3%B8-%C3%A5-in-mail/ Share on other sites More sharing options...
unkwntech Posted December 2, 2008 Share Posted December 2, 2008 Those characters are unicode so you will need to handle that. Link to comment https://forums.phpfreaks.com/topic/135178-solved-no-%C3%A6-%C3%B8-%C3%A5-in-mail/#findComment-704040 Share on other sites More sharing options...
selbekk Posted December 2, 2008 Author Share Posted December 2, 2008 but it works everywhere else through php Link to comment https://forums.phpfreaks.com/topic/135178-solved-no-%C3%A6-%C3%B8-%C3%A5-in-mail/#findComment-704049 Share on other sites More sharing options...
selbekk Posted December 2, 2008 Author Share Posted December 2, 2008 how do I handle that then? I don't get it :/ Link to comment https://forums.phpfreaks.com/topic/135178-solved-no-%C3%A6-%C3%B8-%C3%A5-in-mail/#findComment-704091 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.