From 35a6118df73ebc62ac30065ba24d93678cabeca3 Mon Sep 17 00:00:00 2001 From: Loki3000 Date: Thu, 7 Apr 2016 10:55:56 +0400 Subject: [PATCH] #187 Fix multibyte filename generation https://github.com/owncloud/notes/issues/187 --- service/notesservice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();