2

I am working on a 200+ pages document with currently 250+ bibliography references. I am currently switching my document from BibTeX to BibLaTeX (with bibtex8 set as its backend).

When the firstinits option is set to false, everything works, but when it is set to true, pdflatex stops with the message

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

See the inputenc package documentation for explanation. Type H for immediate help. ...

l.200

How can I find out what this refers to?

  • Line 200 in my main document is the line after the \printbibliography command (though my main document uses \input to include numerous other .tex files).
  • My bibliography is split into several .bib files.
  • Line 200 in the generated .bbl file is an empty line, so there should be no problem in there.

How can I find out which one is the offending entry?

O. R. Mapper
  • 1,029
  • Did you try to search the bbl file for ├? It should give you the entry where the problem is. Also you might consider to switch to biber, it might give a better handling of utf8. – Guido Sep 19 '15 at 19:39
  • @Guido The MWE would make it easier to answer the question asked. I agree it may not be germane to solving the specific problem. But that's not the question. – cfr Sep 19 '15 at 19:52
  • @cfr The MWE would have been \documentclass{article}\usepackage[backend=bibtex8,firstinits=true]{biblatex}\begin{document}\cite{*}\printbibliography\end{document} plus a bibtex record with the character. But the problem does not depend on the actual latex/bibtex code, but the fact that errors in the bbl are reported when they are typeset by \printbiliography. – Guido Sep 19 '15 at 20:06
  • @Guido Never mind. With an MWE you can demonstrate more easily how to isolate things. That's all. I entirely agree that *this* problem is as you say. But that was not the question. – cfr Sep 19 '15 at 20:08
  • @Guido: "a bibtex record with the character" - what character? does not appear in the entire .bbl file, and to me, it looks like a misinterpreted character code in the console rather than an actual bit of a file in its intended encoding, anyway. That is what I am trying to find out. I see myself unable to produce an MWE because I do not know what characteristics in a BibTeX record cause the error. So to speak, my question is not how to solve the issue, but how to reproduce it in an MWE. – O. R. Mapper Sep 19 '15 at 20:18
  • You probably have a (first)name starting wirh some accent, bibtex8 (which can't handle utf8) will break the utf8 char when trying to create the initial. – Ulrike Fischer Sep 19 '15 at 21:04
  • Regarding the error line: The problematic broken utf8 char is in the bbl, but it will be seen by latex when processing \printbibliography so the error line won't give you much info. – Ulrike Fischer Sep 19 '15 at 21:18
  • @UlrikeFischer: I could indeed find one such bibliography item that contains a first author name starting with a non-ASCII character, but even after changing that, the problem persists. Thanks for the suggestion nonetheless. – O. R. Mapper Sep 19 '15 at 21:30
  • Well then there is another one. Put \endinput in the bbl until you find the problematic entry. – Ulrike Fischer Sep 19 '15 at 21:34

1 Answers1

2

These kinds of errors can be a pain to find. However, I think the problem in this case is that you are using UTF-8 encodings with a backend which supports only Latin1 and ASCII. According to the Biblatex manual:

bibtex8, the 8-bit implementation of BibTeX, supports Ascii and 8-bit encodings such as Latin 1. Depending on the csf file, case- sensitive sorting may be supported.

So, you either need to change your .bib file encodings appropriately or use a different backend. bibtexu supports unicode:

bibtexu is a Unicode-enabled implementation of BibTeX which supports utf-8. Note that bibtexu is not actively supported by Biblatex and has not been tested as backend in any way. Biber is the recommended backend.

So you could try it but, if it breaks, you probably get to keep both pieces.

Switching to Biber is almost certainly the most straightforward option here.

cfr
  • 198,882
  • @O.R.Mapper In this case, though, I think there is a simpler explanation. Hang on. I'm going to edit. – cfr Sep 19 '15 at 21:17
  • @cfr: the problem is quite probably a broken utf8 char. The solution is clear: Either use biber or avoid utf8. – Ulrike Fischer Sep 19 '15 at 21:24
  • @O.R.Mapper Tidied up comments a bit. Suggest you do the same. (My answer is now rather different. I actually read the manual ;). See page 45.) – cfr Sep 19 '15 at 21:28
  • Thank you and @UlrikeFischer for the suggestions. I will accept this answer, as it seems promising, though in my current document, I will switch back to BibTeX. Given that Biber does not work out of the box in 64 bit MikTeX, I am too afraid something else will stop working after setting up the 32 bit version of MikTeX or somehow integrating the 32 bit Biber with the 64 bit MikTeX installation. (I am wary of that now, given that switching to BibLaTeX in the first place was a workaround for ... – O. R. Mapper Sep 19 '15 at 21:37
  • ... me to solve my actual problem, avoiding that the alphadin style shows DOIs once as a DOI, and once again as an URL to http://dx.doi.org/...). Each solution seems to open up a whole new bunch or problems, so I'll rather stick with an imperfect bibliography and possibly remove the DOIs. – O. R. Mapper Sep 19 '15 at 21:38
  • @O.R.Mapper: we have 2015 and biber is now included in miktex 64bit. – Ulrike Fischer Sep 19 '15 at 21:43
  • @UlrikeFischer: I ended up trying to update MikTeX and running Biber, but so far, I have not been successful. In any case, thank you for the suggestion; even though I am wary of trouble caused by new versions, having some motivation to update as new features are waiting is a good way to keep one's system up to date. – O. R. Mapper Sep 19 '15 at 23:32
  • @UlrikeFischer: Also, are you sure Biber supports Unicode? I am now getting stuck while running pdflatex after biber, and it breaks with the message ! Package inputenc Error: Unicode char \u8:─ü not set up for use with LaTeX. – O. R. Mapper Sep 20 '15 at 07:22
  • It definitely supports unicode but inputenc does not know all unicode characters. You should find that character in either .bib or .bbl and correct it. As I mentioned before, I've found that using LaTeX macros to produce accents can cause this error, rather than inputting the character directly. I'm not certain why that is, though. – cfr Sep 20 '15 at 12:04
  • @O.R.Mapper Regarding my reputation I do find the question a bit insulting. Make a MWE with the problematic entry. – Ulrike Fischer Sep 20 '15 at 12:10
  • @cfr: The problem is that biber converts them to glyph + combining accent and pdflatex can't handle this. See e.g. https://github.com/plk/biber/issues/65. So one should either use the correct utf8 input or output with --output-safechars. – Ulrike Fischer Sep 20 '15 at 12:13
  • @UlrikeFischer Thanks for the explanation. I tend to go for the first option, since it also makes the .bib files easier to read. But the OP might prefer the second in this case. – cfr Sep 20 '15 at 12:21
  • @O.R.Mapper ^^ See UlrikeFischer's explanation and the --output-safechars option above. – cfr Sep 20 '15 at 12:22
  • @UlrikeFischer: No offense intended. Reputation on an SE site can only ever give an impression of the user's general familiarity with the site as a whole, not about the user's particular knowledge on any given topic within the scope of the site. In any case, the issue I was diagnosing disappears with --output-safechars, and I was finally able to isolate one of the offending entries. As I expect possible ramifications, I have created a question just in case. – O. R. Mapper Sep 20 '15 at 17:31