3

I am trying to write a double language thesis document with the following packages:

\documentclass{customThesis}
\usepackage[greek,english]{babel}
\usepackage[iso-8859-7]{inputenc}

\usepackage[refsection=chapter,

               backend=biber,
               firstinits=true,
               isbn=false,
               url=false,
               safeinputenc,
 %             bibencoding=auto
               sorting=none]{biblatex}

I get the following error when trying to run pdflatex+biber+pdflatex on it: ! Package biblatex Error: Greek requires UTF-8 support. See the biblatex package documentation for explanation.

Any ideas how to make that work?

  • Unfortunately the Greek localisation module needs utf8 because its .lbx file is encoded in UTF-8. – moewe Sep 25 '18 at 10:17
  • 1
    My suggestion is not about using the old encoding, but can't you convert it to UTF-8? Something like iconv -f iso-8859-7 -t utf-8 < input > output should do. All editors from, like, last 10 years, should support Unicode. – Oleg Lobachev Sep 25 '18 at 10:56
2

biblatex's localisation modules require UTF-8 encoding for some languages with non-Latin alphabet (at the moment Bulgarian, Greek, Russian, Ukrainian). That means that those .lbx files can only be loaded if the document is UTF-8 encoded (or rather, if biblatex detects that it is processed in an UTF-8 mode).

The modules will issue an error if a UTF-8 encoding is not detected. If you need biblatex in Greek, you can't use ISO 8859-7 (or rather you'd have to re-encode greek.lbx into ISO 8859-7).

Unfortunately, the mere fact that the language has been declared to babel will cause the localisation module to be loaded, even if it is not actually needed and used. That means that you can get this error even if you don't care about greek.lbx at all. In that case – and only in that case – you can silence the error with \csletcs{lbx@ifutfinput}{@firstoftwo}. That line pretends that the .lbx file is read in UTF-8 mode. This will only work smoothly if you never use the Greek localisation, otherwise you might run into all sorts of errors or undesired behaviour.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[greek,english]{babel}
\usepackage[iso-8859-7]{inputenc}
\usepackage{csquotes}

\usepackage[style=authoryear, backend=biber]{biblatex}

\csletcs{lbx@ifutfinput}{@firstoftwo}

\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{sigfridsson}
\printbibliography
\end{document}

compiles without error. Even though it loads greek with babel. english is the main language and Greek never used for citations or the bibliography, so everything is working fine.

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.