diff --git a/Modules/Bibliographic/classes/class.ilObjBibliographic.php b/Modules/Bibliographic/classes/class.ilObjBibliographic.php index 1e0090759627..6f08ea0210ff 100644 --- a/Modules/Bibliographic/classes/class.ilObjBibliographic.php +++ b/Modules/Bibliographic/classes/class.ilObjBibliographic.php @@ -490,8 +490,10 @@ public function writeSourcefileEntriesToDb() { $attribute = implode(", ", $attribute); } // reduce the attribute strings to a maximum of 4000 (ATTRIBUTE_VALUE_MAXIMAL_TEXT_LENGTH) characters, in order to fit in the database - if (mb_strlen($attribute, 'UTF-8') > self::ATTRIBUTE_VALUE_MAXIMAL_TEXT_LENGTH) { - $attribute = mb_substr($attribute, 0, self::ATTRIBUTE_VALUE_MAXIMAL_TEXT_LENGTH - 3, 'UTF-8') . '...'; + //if (mb_strlen($attribute, 'UTF-8') > self::ATTRIBUTE_VALUE_MAXIMAL_TEXT_LENGTH) { + if (ilStr::strLen($attribute) > self::ATTRIBUTE_VALUE_MAXIMAL_TEXT_LENGTH) { + // $attribute = mb_substr($attribute, 0, self::ATTRIBUTE_VALUE_MAXIMAL_TEXT_LENGTH - 3, 'UTF-8') . '...'; + $attribute = ilStr::subStr($attribute, 0, self::ATTRIBUTE_VALUE_MAXIMAL_TEXT_LENGTH - 3) . '...'; } // ty (RIS) or entryType (BIB) is the type and is treated seperately if (strtolower($key) == 'ty' || strtolower($key) == 'entrytype') {