utf 8 - PHP and Russian Letters -


What is happening with the Russian letters on sending via PHP requests ... a mail, like? The "hardcoded" Russian characters are displayed correctly, but with the hieroglyphs from the textboxx of the document:

HTML page:

  & lt; Tr & gt; & Lt; Td style = "width: 280px" & gt; Cold work & lt; / Td> & Lt; Td> & Lt; Input type = "text" id = "workaround" /> & Lt; / Td> & Lt; / TR & gt;  

PHP Page:

$ Work Resource = $ _REQUEST ["Work Resource"]; // Содержание работ // ... $ WorkContentLabel = "Working On"; // ... $ message. = $ WorkContentLabel ": \ T". $ Work Content "\ N"; // ... // Email stuff (data has been changed below) $ = "test@gmail.com"; $ From = "me@domain.com"; $ From_header = "From: Russian site command"; $ Theme = "message with Russian letter"; $ Theme = '=? UTF-8? B? ' $ Subject '? = '; $ Message = $ Topic; // Send mail to mail ($ from, $ theme, $ message, $ from_header);

Enter some content into the user text box:

and submit the form.

What will I get (in GIML):

  shortcut: 1) ROBT  

So, Hard-coded Russian text - OK, form Russian text - NOK , ASCII sent by text - OK .

Does anyone know what might be the reason for that strange behavior with encoding?

edit: used

  $ subject = "оборудования - topic with Russian letters"; $ Theme = '=? UTF-8? B? ' . Base64_encode ($ theme) '? = '; $ Message = $ Topic;    

You receive base64_encode () your $ theme , is such a requirement:

  $ subject = '=? UTF-8? B? '. Base64_encode ($ theme) '? = ';  

Be sure to enter your .php file in UTF-8 no. BOM .


This question may also interest you:


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -