Changed regex in formatAuthorInitials to work correctly with unicode firstnames

This commit is contained in:
Klaus-Hendrik Wolf
2015-10-07 16:03:57 +02:00
parent 946798f41b
commit 905ac6feb2
+1 -1
View File
@@ -1315,7 +1315,7 @@ class BibEntry {
*/ */
function formatAuthorInitials($author){ function formatAuthorInitials($author){
list($firstname, $lastname) = splitFullName($author); list($firstname, $lastname) = splitFullName($author);
if ($firstname!='') return $lastname.' '.preg_replace("/(\p{Lu})\w*[- ]*/S","$1", $firstname); if ($firstname!='') return $lastname.' '.preg_replace("/(\p{Lu})\w*[- ]*/Su","$1", $firstname);
else return $lastname; else return $lastname;
} }