5

I am trying to compile a document using BibLaTeX and Biber that references a document by a Latvian author whose surname contains an a with a macron diacritical mark (ā).

Without the --output-safechars flag for Biber, pdflatex cannot process the .bbl file and says:

Package inputenc Error: Unicode char \u8:-ü not set up for use with LaTeX.

This seems to refer to the aforementioned special character ā, even though I took care to use the appropriate LaTeX escape sequence {\=a} in my .bib file.


MWE:

File test.tex:

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[
  backend=biber,
  style=alphabetic
]{biblatex}
\addbibresource{test.bib}

\begin{document}

abc~\cite{SIOC}

\printbibliography

\end{document}

File test.bib:

@MISC{SIOC,
  author = {Uldis Boj\={a}rs and John Breslin},
  title = {{SIOC} Core Ontology Specification},
  howpublished = {\url{http://rdfs.org/sioc/spec/}},
  year = {2010},
  timestamp = {2015.07.06}
}

Steps to reproduce the error:

pdflatex test.tex
biber test
pdflatex test.tex

Steps to work around the error and get the desired PDF file:

pdflatex test.tex
biber --output-safechars test
pdflatex test.tex
biber --output-safechars test
pdflatex test.tex
pdflatex test.tex

Interestingly, with --output-safechars, the author name is rendered in the .bbl file as follows:

{{hash=4364fe18faaa147d121961f15b77b40a}{Boj\={a}rs}{B\bibinitperiod}{Uldis}{U\bibinitperiod}{}{}{}{}}%

Without --output-safechars, it is rendered like this:

{{hash=4364fe18faaa147d121961f15b77b40a}{Bojārs}{B\bibinitperiod}{Uldis}{U\bibinitperiod}{}{}{}{}}%

That means, Biber actively changes my escape sequence (that would have worked in pdflatex) back to a Unicode character (that does not work).


Is this the expected behaviour?

More concretely:

Is it safe in terms of side-effects to use --output-safechars instead, and if so, is there any reason why one would ever call Biber without --output-safechars?

Alternatively, it seems to be possible to define the respective Unicode characters, or allegedly to use a --bblsafechars option, even though that does not appear in the Biber manual.

  • I would recommend declaring the character(s) required as this will support searching etc. better, I believe. (But I'm not sure.) But that is not to do with the encoding switch for Biber. – cfr Sep 20 '15 at 17:50
4

Yes it is the expected behaviour. biber will (try to) convert commands in the input to unicode to be able to sort the entries.

For accent commands it will in a number of case use the unicode "glyph + combining accent" representation.

It will then later output this "glyph + combining accent" in the bbl and pdflatex won't be able to use it (and it is not possible to change this).

The best way to avoid the problem is not to use accent commands like \= in the bib but only the correct utf8-input ā. --output-safechars should normally work ok too, but it will convert other non-ascii input to commands too (e.g. the euro) and you should check if you really always get the command you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.
https://tex.stackexchange.com/questions/268567/is-it-expected-that-biber-converts-escape-sequences-into-non-processable-unicode
tex.stackexchange.com
crawl=CC-MAIN-2019-35
140640
application/http; msgtype=response
sha1:DLZIQA3UJIWMPTIOPEHNBF7HQUNHIOXY
<urn:uuid:caacd095-6549-4980-aa68-6f28c5fec092>
2019-08-23T09:39:54Z
151.101.193.69
text/html
sha1:XCF3ETPBAPXN7LRH5HZKYENWLXQZQBQL
<urn:uuid:7f6d2651-55d3-448f-90bf-01b9756577ef>
https://tex.stackexchange.com/questions/268567/is-it-expected-that-biber-converts-escape-sequences-into-non-processable-unicode
response
<urn:uuid:73d567de-3000-4c70-8223-5009404869f4>
isPartOf: CC-MAIN-2019-35
publisher: Common Crawl
description: Wide crawl of the web for August 2019
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-159.ec2.internal
software: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/