My co-authors are using Overleaf to prepare a manuscript using the Springer LNCS style (version 2.21). The bibliography entries contain names with various non-ASCII letters, such as the dotted G (Ġ), some (but not all) of which cause "Invalid UTF-8 byte sequence" errors when compiling with pdflatex
. (Similar errors are triggered when compiling with xelatex
and lualatex
.) The problem seems to occur only when using Springer's bst
file, but not when using BibTeX's default bibliography styles.
The problem is also reproducible when compiling the document offline with TeX Live 2022, which uses utf8
as its default input encoding. I've verified that the input files are definitely UTF-8–encoded and the offending characters are valid UTF-8 sequences. Using bibtexu
instead of bibtex
works around the problem, but there doesn't seem to be any way of telling Overleaf to use bibtexu
.
What's the cause of the problem and what's the best way of fixing or working around it so that we can continue to use Overleaf? Unfortunately, we are obliged to use the Springer bibliography style, but perhaps there is some way we can patch it?
I suppose one workaround would be to rewrite the offending letters in the bib
file with LaTeX command sequences (e.g., ${\mathrm{\dot{G}}}$
for Ġ), though this ends up mixing text and math fonts and prevents us from simply copying and pasting existing bibliography entries into the file. Besides, our bibliography file may contain dozens of different non-ASCII characters and it's not clear to us which need to be replaced. (The problem occurs with some letters but not others.)
Here is a minimal example demonstrating the problem:
\documentclass[runningheads]{llncs}
\begin{filecontents}{\jobname.bib}
@incollection{foo,
title = {Foo},
booktitle = {Bar},
author = {Mathurin, Élise and Mallia, Ġorġ},
year = {2022},
}
\end{filecontents}
\begin{document}
\nocite{foo}
\bibliographystyle{splncs04}
\bibliography{\jobname}
\end{document}
{\.{G}}or{\.{g}}
ought to do the trickbibtexu
, but I need to test this first to be sure... I'll be right back :){\relax{É}}lise