r1568: We now properly tell MySQL to use utf8 and we send a content-type header...
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 8 Jul 2007 00:00:30 +0000 (00:00 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 8 Jul 2007 00:00:30 +0000 (00:00 +0000)
docs/changes.txt
includes/config.php.new
includes/init.php

index 53dfc93d1dcbdd599324e9ff879436f8118b6f4b..fcb430ee39e973a38d435797d9efc12bfc36803c 100644 (file)
@@ -6,6 +6,7 @@
 - Fixed: A "call to undefined function A()" would be thrown under some occasions when viewing a bug
 - Change: Email templates are now found in the locale/ directory so they can be translated (bug://report/81)
 - Fixed: Column headers were not translated for multiple languages (bug://report/79)
+- Fixed: Multibyte language emails are now sent out correctly (bug://report/82)
 
 1.2.0 Release Candidate 1
 ===============================
index 3ddbfcc802b6be59829fc423953f2abc4a6f5dd7..944ff40cc20fcc09774b61b976b55822c8763510 100644 (file)
@@ -47,6 +47,14 @@ $password = '';
 // use to store information in. You or your host will have to make it.
 $database = 'bugdb';
 
+// ###################################################################
+// ///////////////////////// UTF8
+// Set this to FALSE if you do not want to use UTF8 as your encoding
+// It is recommended that you use UTF8, however. Do NOT set this to
+// true if your database is not UTF8 (all new installations 1.2 and
+// later do use UTF8)
+$utf8 = true;
+
 // ###################################################################
 // ///////////////////////// MYSQL PCONNECT
 // -------------------------------------------------------------------
index cd3f39d61e95905cd9eb842d8cf15c1fb0deeed9..503b7fc1073e6a5a32f26ca96c259db6b5feed81 100755 (executable)
@@ -47,6 +47,10 @@ $bugsys->setDebug($debug);
 define('ISSO_DB_LAYER', 'db_mysql');
 $bugsys->load('db_mysql', 'db', true);
 $db->connect($servername, $username, $password, $database, $usepconnect);
+if ($utf8)
+{
+       $db->query("SET NAMES utf8");
+}
 
 $bugsys->load('functions', 'funct', true);
 $bugsys->load('xml', 'xml', true);
@@ -76,6 +80,10 @@ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
 header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
 header("Cache-Control: no-store, no-cache, must-revalidate");
 header("Cache-Control: post-check=0, pre-check=0", false);
+if ($utf8)
+{
+       header("Content-Type: text/html; charset=\"utf8\"");
+}
 header("Pragma: no-cache");
 
 // ###################################################################