diff --git a/service/notesservice.php b/service/notesservice.php index fdad9c02..b7ae6a61 100644 --- a/service/notesservice.php +++ b/service/notesservice.php @@ -116,7 +116,7 @@ public function update ($id, $content, $userId){ // in case of markdown $title = ltrim($title, ' #'); // using a maximum of 100 chars should be enough - $title = substr($title, 0, 100); + $title = mb_substr($title, 0, 100, "UTF-8"); // generate filename if there were collisions $currentFilePath = $file->getPath();