You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please follow the general troubleshooting steps first:
I read the README and followed the instructions.
I am sure that the used CSL metadata follows the CSL schema.
I use a valid CSL stylesheet
Bug reports:
We first received a report of this behaviour in one of our hosted OJS installations. A Norwegian journal who had authors with the first name Åse reported that citations generated with this name did not convert this to Å but instead kept the whole name. I've since duplicated this in other OJS installations, and have also just cloned the citeproc-php repository and changed one of the author names in the sample JSON to Åse and the problem occurs there as well, when running the example/index.php script.
In my investigating I discovered that the file ./src/Util/StringHelper.php contains a method called initializeBySpaceOrHyphen that appears to split the first letter off of a string. If a string like Åse is passed in, the first letter is correctly split off but then the StringHelper::isLatinString method returns true here (it probably should not?) and then the call to ctype_upper fails, which causes the method to return the entire string again. I was able to get this to correctly work by temporarily negating the test for StringHelper::isLatinString in the if statement.
Used CSL stylesheet:
apa.csl
Used CSL metadata
Please replace these lines with your used metadata, for instance:
Our journal also has the same issue with failed abbreviation of authors' first names starting with characters with diactritics.
Can this issue be assigned a bug status? Any idea how quickly this can be fixed. Thank you in advance.
glorieux-f
added a commit
to glorieux-f/citeproc-php
that referenced
this issue
Aug 3, 2023
Please follow the general troubleshooting steps first:
Bug reports:
We first received a report of this behaviour in one of our hosted OJS installations. A Norwegian journal who had authors with the first name Åse reported that citations generated with this name did not convert this to Å but instead kept the whole name. I've since duplicated this in other OJS installations, and have also just cloned the citeproc-php repository and changed one of the author names in the sample JSON to Åse and the problem occurs there as well, when running the example/index.php script.
In my investigating I discovered that the file
./src/Util/StringHelper.php
contains a method calledinitializeBySpaceOrHyphen
that appears to split the first letter off of a string. If a string like Åse is passed in, the first letter is correctly split off but then theStringHelper::isLatinString
method returns true here (it probably should not?) and then the call to ctype_upper fails, which causes the method to return the entire string again. I was able to get this to correctly work by temporarily negating the test forStringHelper::isLatinString
in theif
statement.Used CSL stylesheet:
apa.csl
Used CSL metadata
Please replace these lines with your used metadata, for instance:
The text was updated successfully, but these errors were encountered: