evgenyvo Posted October 29, 2014 Share Posted October 29, 2014 Hi All, I'm trying to return HTML page contains the Russian characters sent as POST variables and also static data as part of HTML result. I'm not able to put it work together. If I set windows-1251 - the static data displayed incorrectly. If I set UTF-8 - the dynamic (POST) data displayed incorrectly Any thoughts? Thank you very much in advance, Evgeny Following is the simple HTML example and also Fiddler request example <?php header('Content-Type: text/html;charset=windows-1251'); $firstName = $_POST["from"]; $subject = $_POST["subject"]; $message = $_POST["message"]; $version = phpversion(); $messageToSend = " <html> <meta http-equiv='Content-Type' content='text/html; charset=windows-1251'> <head> <title>Christiada2033 automatic email</title> </head> <body> <p>Static russian: По-русски</p> <table> <tr> <td>Version:</td> <td>$version </tr> <tr> <td>Static russian: Отправитель:</td> <td>Post value russian: $firstName</td> </tr> <tr> <td>Static russian: Тема:</td> <td>Post value russian: $subject</td> </tr> <tr> <td>Static russian: Сообщение:</td> <td>Post value russian: $message</td> </tr> </table> </body> </html> "; printf($messageToSend); die(); ?> =====================Fiddler===================== POST http://myhost/mysite/mail_html2.php HTTP/1.1 Host: myhost Connection: keep-alive Content-Length: 132 Cache-Control: max-age=0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Origin: http://localhost User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36 Content-Type: application/x-www-form-urlencoded Referer: http://myhost/mysite/Mail_Html2.shtml Accept-Encoding: gzip,deflate Accept-Language: en-GB,en;q=0.8,en-US;q=0.6,ru;q=0.4,he;q=0.2 from=%C8%E2%E0%ED+%CF%E5%F2%F0%EE%E2&subject=%D2%E5%EC%E0&message=%CF%F0%E8%E2%E5%F2%2C+%EF%F0%E8%E2%E5%F2%21&submit=Submit+Feedback =====================Fiddler===================== Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.