diff --git a/build/index.php b/build/index.php
index 8817c99..3148815 100644
--- a/build/index.php
+++ b/build/index.php
@@ -1189,19 +1189,19 @@ if(!file_exists($paths->pageindex))
 		
 		// Create a new entry
 		$newentry = new stdClass();
-		$newentry->filename = utf8_encode(substr( // Store the filename, whilst trimming the storage prefix
+		$newentry->filename = substr( // Store the filename, whilst trimming the storage prefix
 			$pagefilename,
-			strlen(preg_replace("/^\.\//i", "", $env->storage_prefix)) // glob_recursive trim the ./ from returned filenames , so we need to as well
-		));
+			mb_strlen(preg_replace("/^\.\//iu", "", $env->storage_prefix)) // glob_recursive trim the ./ from returned filenames , so we need to as well
+		);
 		// Remove the `./` from the beginning if it's still hanging around
 		if(substr($newentry->filename, 0, 2) == "./")
 			$newentry->filename = substr($newentry->filename, 2);
 		$newentry->size = filesize($pagefilename); // Store the page size
 		$newentry->lastmodified = filemtime($pagefilename); // Store the date last modified
 		// Todo find a way to keep the last editor independent of the page index
-		$newentry->lasteditor = utf8_encode("unknown"); // Set the editor to "unknown"
+		$newentry->lasteditor = "unknown"; // Set the editor to "unknown"
 		// Extract the name of the (sub)page without the ".md"
-		$pagekey = utf8_encode(substr($newentry->filename, 0, -3));
+		$pagekey = mb_substr($newentry->filename, 0, -3);
 		
 		if(file_exists($env->storage_prefix . $pagekey) && // If it exists...
 			!is_dir($env->storage_prefix . $pagekey)) // ...and isn't a directory
@@ -1388,7 +1388,7 @@ class ids
 			$nextid++;
 		
 		// Update the id index
-		$idindex->$nextid = utf8_encode($pagename);
+		$idindex->$nextid = $pagename;
 
 		// Save the id index
 		file_put_contents($paths->idindex, json_encode($idindex));
@@ -4109,7 +4109,7 @@ class search
 	public static function index($source)
 	{
 		$source = html_entity_decode($source, ENT_QUOTES);
-		$source_length = strlen($source);
+		$source_length = mb_strlen($source);
 		
 		$index = [];
 		
@@ -4188,7 +4188,7 @@ class search
 				$missing_files++;
 				continue;
 			}
-			$pagesource = utf8_encode(file_get_contents($page_filename));
+			$pagesource = Normalizer::normalize(file_get_contents($page_filename), Normalizer::FORM_C);
 			$index = self::index($pagesource);
 			
 			$pageid = ids::getid($pagename);
@@ -6560,9 +6560,9 @@ DIFFSCRIPT;
 				$pageindex->{$env->page}->size = strlen($_POST["content"]);
 				$pageindex->{$env->page}->lastmodified = time();
 				if($env->is_logged_in)
-					$pageindex->{$env->page}->lasteditor = utf8_encode($env->user);
+					$pageindex->{$env->page}->lasteditor = $env->user;
 				else // TODO: Add an option to record the user's IP here instead
-					$pageindex->{$env->page}->lasteditor = utf8_encode("anonymous");
+					$pageindex->{$env->page}->lasteditor = "anonymous";
 				$pageindex->{$env->page}->tags = $page_tags;
 				
 				// A hack to resave the pagedata if the preprocessors have
diff --git a/core.php b/core.php
index 68f85cf..fd50a5e 100644
--- a/core.php
+++ b/core.php
@@ -813,19 +813,19 @@ if(!file_exists($paths->pageindex))
 		
 		// Create a new entry
 		$newentry = new stdClass();
-		$newentry->filename = utf8_encode(substr( // Store the filename, whilst trimming the storage prefix
+		$newentry->filename = substr( // Store the filename, whilst trimming the storage prefix
 			$pagefilename,
-			strlen(preg_replace("/^\.\//i", "", $env->storage_prefix)) // glob_recursive trim the ./ from returned filenames , so we need to as well
-		));
+			mb_strlen(preg_replace("/^\.\//iu", "", $env->storage_prefix)) // glob_recursive trim the ./ from returned filenames , so we need to as well
+		);
 		// Remove the `./` from the beginning if it's still hanging around
 		if(substr($newentry->filename, 0, 2) == "./")
 			$newentry->filename = substr($newentry->filename, 2);
 		$newentry->size = filesize($pagefilename); // Store the page size
 		$newentry->lastmodified = filemtime($pagefilename); // Store the date last modified
 		// Todo find a way to keep the last editor independent of the page index
-		$newentry->lasteditor = utf8_encode("unknown"); // Set the editor to "unknown"
+		$newentry->lasteditor = "unknown"; // Set the editor to "unknown"
 		// Extract the name of the (sub)page without the ".md"
-		$pagekey = utf8_encode(substr($newentry->filename, 0, -3));
+		$pagekey = mb_substr($newentry->filename, 0, -3);
 		
 		if(file_exists($env->storage_prefix . $pagekey) && // If it exists...
 			!is_dir($env->storage_prefix . $pagekey)) // ...and isn't a directory
@@ -1012,7 +1012,7 @@ class ids
 			$nextid++;
 		
 		// Update the id index
-		$idindex->$nextid = utf8_encode($pagename);
+		$idindex->$nextid = $pagename;
 
 		// Save the id index
 		file_put_contents($paths->idindex, json_encode($idindex));
diff --git a/module_index.json b/module_index.json
index 06cda5b..38a1a1a 100755
--- a/module_index.json
+++ b/module_index.json
@@ -104,7 +104,7 @@
         "author": "Starbeamrainbowlabs",
         "description": "Adds proper search functionality to Pepperminty Wiki using an inverted index to provide a full text search engine. If pages don't show up, then you might have hit a stop word. If not, try requesting the `invindex-rebuild` action to rebuild the inverted index from scratch.",
         "id": "feature-search",
-        "lastupdate": 1521389882,
+        "lastupdate": 1521390977,
         "optional": false
     },
     {
@@ -167,7 +167,7 @@
         "author": "Starbeamrainbowlabs",
         "description": "Allows you to edit pages by adding the edit and save actions. You should probably include this one.",
         "id": "page-edit",
-        "lastupdate": 1518645807,
+        "lastupdate": 1521390769,
         "optional": false
     },
     {
diff --git a/modules/feature-search.php b/modules/feature-search.php
index daf636a..ca5c541 100644
--- a/modules/feature-search.php
+++ b/modules/feature-search.php
@@ -509,7 +509,7 @@ class search
 	public static function index($source)
 	{
 		$source = html_entity_decode($source, ENT_QUOTES);
-		$source_length = strlen($source);
+		$source_length = mb_strlen($source);
 		
 		$index = [];
 		
@@ -588,7 +588,7 @@ class search
 				$missing_files++;
 				continue;
 			}
-			$pagesource = utf8_encode(file_get_contents($page_filename));
+			$pagesource = Normalizer::normalize(file_get_contents($page_filename), Normalizer::FORM_C);
 			$index = self::index($pagesource);
 			
 			$pageid = ids::getid($pagename);
diff --git a/modules/page-edit.php b/modules/page-edit.php
index d9c4374..b8f2858 100644
--- a/modules/page-edit.php
+++ b/modules/page-edit.php
@@ -424,9 +424,9 @@ DIFFSCRIPT;
 				$pageindex->{$env->page}->size = strlen($_POST["content"]);
 				$pageindex->{$env->page}->lastmodified = time();
 				if($env->is_logged_in)
-					$pageindex->{$env->page}->lasteditor = utf8_encode($env->user);
+					$pageindex->{$env->page}->lasteditor = $env->user;
 				else // TODO: Add an option to record the user's IP here instead
-					$pageindex->{$env->page}->lasteditor = utf8_encode("anonymous");
+					$pageindex->{$env->page}->lasteditor = "anonymous";
 				$pageindex->{$env->page}->tags = $page_tags;
 				
 				// A hack to resave the pagedata if the preprocessors have
