There have been a few questions already regarding biblatex and the handling of special characters in fields like abstract (e.g. not needed for the output), cf. Error with percent sign in bib entry field when using biblatex/biber.
A common answer is to use the sourcemap mechanism of biblatex and to remove such fields.
However, when trying this even on a very simple example, biber removes the field (cf. output of biber --debug),
[314] bibtex.pm:727> DEBUG - Source mapping (type=user, key=test):
Deleting field 'abstract'
but still complains about the contents of such a field.
My question is, whether there is any way to solve such problems or is the modification by \DeclareSourceMap just too late? Is there any other solution (within biblatex)?
\begin{filecontents}{ex.bib}
@book{test,
author = {Mustermann, Max},
title = {Example},
abstract = {A maybe longer text with a = b or
c = d and other special characters.}
}
\end{filecontents}
\begin{filecontents}{biblatex.cfg}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map[overwrite]{%
\step[fieldset=abstract,null]%
}%
}%
}%
\end{filecontents}
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[]{biblatex}
\addbibresource{ex.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
='s fault. Since that is a special character for Biber, it warns you about this, since a stray=and could mean that your entry is somehow messed up, because you forgot braces. Apparently that warning about a possible malformed file comes before sourcemapping. (Which makes sense, you would want to know about a malformed.bibfile as soon as possible.) – moewe Mar 02 '17 at 13:16\DeclareSourceMapin this case as well (BTW: Same with\}. I guess I have to do some sed here. The data come from an automatic workflow. Thus manual editing is not an option. – Martin Mar 02 '17 at 14:25biberstopped working. I will check, whether this can be solved with\DeclareSourceMapat least. – Martin Mar 02 '17 at 14:28=here could be a symptom of a malfomed.bibfile, and indeed sometimes the contents of a field (especially the contents of theabstractfield when downloaded from another source) has the potential to really mess up parsing if the content is crappy. A really bad input can already cause errors at the parsing phase, from which you can't recover without changing the file. – moewe Mar 02 '17 at 14:34biberdoes not process entries when the author field is not okay:WARN - Name "ST, UT, RH, KW" has too many commas: skipping nameThis is even true for customized entry types. So I got a lot of undefined references. – Martin Mar 02 '17 at 14:55authorfield is always parsed as a name field, and there the comma has a special meaning, separating parts of a name. If there are too many commas around, Biber bails out, because it can't understand the name. – moewe Mar 02 '17 at 16:27