Index: common/db/db_mysql.php
===================================================================
--- common/db/db_mysql.php	(revision 929)
+++ common/db/db_mysql.php	(working copy)
@@ -7,15 +7,14 @@
     // Repetitive include guard. Is this really needed?
     log_assert(!isset($dbLink), "Already connected to the database.");
 
-    $old_errorlevel = error_reporting(0);
     // log_print("connecting to database");
-    if (!$dbLink = mysql_connect(IA_DB_HOST, IA_DB_USER, IA_DB_PASS)) {
+    if (!$dbLink = @mysql_connect(IA_DB_HOST, IA_DB_USER, IA_DB_PASS)) {
         log_error('Cannot connect to database: '.mysql_error());
     }
-    if (!mysql_select_db(IA_DB_NAME, $dbLink)) {
+    if (!@mysql_select_db(IA_DB_NAME, $dbLink)) {
         log_error('Cannot select database.');
     }
-    error_reporting($old_errorlevel);
+    mysql_query('SET NAMES utf8');
 }
 
 function db_isalive() {
Index: common/diff.php
===================================================================
--- common/diff.php	(revision 929)
+++ common/diff.php	(working copy)
@@ -39,11 +39,8 @@
         }
     }
 
-    // capture diff output
-    ob_start();
-    system("diff -au ".$name[0]." ".$name[1]);
-    $diff = ob_get_contents();
-    ob_end_clean();
+    // execute diff
+    exec("diff -au ".$name[0]." ".$name[1], $lines);
 
     // delete temporary files
     for ($i = 0; $i < 2; ++$i) {
@@ -53,7 +50,6 @@
     }
 
     // parse diff output 
-    $lines = explode("\n", $diff);
     $result = array();
     $block_cnt = 0; $op_cnt = -1; 
     foreach ($lines as $line) {
Index: www/config.php
===================================================================
--- www/config.php	(revision 929)
+++ www/config.php	(working copy)
@@ -66,7 +66,7 @@
 define("IA_BLOG_SIDEBAR", "blog-sidebar");
 
 // LaTeX support
-define("IA_LATEX_ENABLE", true);
+define("IA_LATEX_ENABLE", false);
 
 // List of infoarena controllers
 $IA_DIRECT_CONTROLLERS = array('register', 'news_feed', 'changes',
Index: www/views/header.php
===================================================================
--- www/views/header.php	(revision 929)
+++ www/views/header.php	(working copy)
@@ -18,7 +18,8 @@
         }
     }
 }
- 
+
+header("Content-type: text/html; charset=utf-8");
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
Index: www/views/textblock_diff.php
===================================================================
--- www/views/textblock_diff.php	(revision 929)
+++ www/views/textblock_diff.php	(working copy)
@@ -19,14 +19,14 @@
             foreach ($op['lines'] as $line) {
                 $output = "";
                 if (!is_array($line)) {
-                    $output = htmlentities($line);
+                    $output = htmlentities($line, ENT_COMPAT, "utf-8");
                 } else {
                     // line contains inline diff
                     foreach ($line as $chunk) {
                         if ($chunk['type'] != 'normal') {
                             $output .= '<'.$chunk['type'].'>';
                         }
-                        $output .= htmlentities($chunk['string']); 
+                        $output .= htmlentities($chunk['string'], ENT_COMPAT, "utf-8"); 
                         if ($chunk['type'] != 'normal') {
                             $output .= '</'.$chunk['type'].'>';
                         }
Index: www/views/textblock_edit.php
===================================================================
--- www/views/textblock_edit.php	(revision 929)
+++ www/views/textblock_edit.php	(working copy)
@@ -7,7 +7,7 @@
 include('views/tags_header.php');
 ?>
 
-<form action="<?= htmlentities(url_textblock_edit($page_name)) ?>" method="post" id="form_wikiedit" <?= tag_form_event() ?>>
+<form accept-charset="utf-8" action="<?= htmlentities(url_textblock_edit($page_name)) ?>" method="post" id="form_wikiedit" <?= tag_form_event() ?>>
 <input type="hidden" id="form_page_name" value="<?= htmlentities(isset($page_name) ? $page_name : '') ?>" />
 <input type="hidden" name="last_revision" value="<?=htmlentities($last_revision)?>" />
 
Index: www/views/utilities.php
===================================================================
--- www/views/utilities.php	(revision 929)
+++ www/views/utilities.php	(working copy)
@@ -13,7 +13,7 @@
     }
 
     if ($escape_html) {
-        return htmlentities(getattr($view['form_values'], $param_name));
+        return htmlentities(getattr($view['form_values'], $param_name), ENT_COMPAT, "utf-8");
     } else {
         return getattr($view['form_values'], $param_name);
     }
@@ -42,7 +42,7 @@
     global $view;
 
     if ($escape_html) {
-        return htmlentities(getattr($view['form_errors'], $param_name));
+        return htmlentities(getattr($view['form_errors'], $param_name), ENT_COMPAT, "utf-8");
     } else {
         return getattr($view['form_errors'], $param_name);
     }
Index: www/wiki/wiki.php
===================================================================
--- www/wiki/wiki.php	(revision 929)
+++ www/wiki/wiki.php	(working copy)
@@ -14,6 +14,8 @@
             'disable_html' => true,
             'disable_filters' => true,
             'trim_spaces' => false,
+            'charset' => 'utf-8',
+            'char_encoding' => 0,
             'preserve_spaces' => true,
     );
     $weaver = new MyTextile($options);
