From 905ac6feb24c530ab208240296b5a5ab4dcf1431 Mon Sep 17 00:00:00 2001 From: Klaus-Hendrik Wolf Date: Wed, 7 Oct 2015 16:03:57 +0200 Subject: [PATCH] Changed regex in formatAuthorInitials to work correctly with unicode firstnames --- bibtexbrowser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bibtexbrowser.php b/bibtexbrowser.php index 9d460dc..9c48240 100755 --- a/bibtexbrowser.php +++ b/bibtexbrowser.php @@ -1315,7 +1315,7 @@ class BibEntry { */ function formatAuthorInitials($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; }