Browse Source

Make sure that HTTP responses and the emails are considered as being utf-8... not sure of the real benefit, but we've seen a number of things about this so Denis and I decided to more forward and take the chance.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@295 a333f486-631f-4898-b8df-5754b55c2be0
romainq 15 năm trước cách đây
mục cha
commit
ccc8a2a225
2 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 1 0
      application/itopwebpage.class.inc.php
  2. 3 1
      core/email.class.inc.php

+ 1 - 0
application/itopwebpage.class.inc.php

@@ -220,6 +220,7 @@ EOF
         echo "<html>\n";
         echo "<head>\n";
         echo "<title>{$this->s_title}</title>\n";
+        echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
         echo $this->get_base_tag();
         // Stylesheets MUST be loaded before any scripts otherwise
         // jQuery scripts may face some spurious problems (like failing on a 'reload')

+ 3 - 1
core/email.class.inc.php

@@ -43,7 +43,9 @@ class EMail
 	public function Send()
 	{
 		$sHeaders  = 'MIME-Version: 1.0' . "\r\n";
-		$sHeaders .= 'Content-type: text/html; charset=utf-8' . "\r\n";
+		// ! the case is important for MS-Outlook
+		$sHeaders .= 'Content-Type: text/html; charset=UTF-8' . "\r\n";
+		$sHeaders .= 'Content-Transfer-Encoding: 8bit' . "\r\n";
 		foreach ($this->m_aHeaders as $sKey => $sValue)
 		{
 			$sHeaders .= "$sKey: $sValue\r\n";