9

I'm getting this error from moderncv version 1.1.1. With earlier version everything was ok and I did not make any changes to my tex document. I don't use any special font. File encoding is set to utf-8. What is the problem?

3
  • 1
    There are some changes which are not documented. But we need an example to see your error. At the moment we can guess. Aug 10, 2012 at 23:01
  • @Teddy There are some warnings that appear with TL2012 that used to be suppressed: they don't reflect a change of outcome. As Marco says, we could do to see the error to know if this is what you are seeing.
    – Joseph Wright
    Aug 11, 2012 at 7:40
  • This is a minimal working example: ideone.com/F8Njm The error is ** WARNING ** Failed to convert input string to UTF16... and it's printed only once when compiling a document by first time. It's being printed 11 times when document is being compiled twice or more. If I delete *.aux, *.log and *.out files and again do xelatex template.tex - it backs to previous state (prints error about UTF16 only once).
    – Teddy
    Aug 11, 2012 at 10:51

2 Answers 2

17

moderncv loads hyperref with the option unicode. This leads to the warning as you can try with this minimal example:

\documentclass{article}
\usepackage[unicode]{hyperref}
\hypersetup{pdfkeywords   = {test}}
\begin{document}
abx
\end{document}

The warning is described in section 6 of readme.pdf from hyperref. The best would be if moderncv would not use the option when xelatex is used.

6
  • I need xelatex because i use fontspec package and some packages that handle unicode. Is there any good reason to switch to pdflatex or should I stay with xelatex?
    – Teddy
    Aug 11, 2012 at 14:01
  • I either can't disable this by \usepackage[unicode=false]{hyperref} or \usepackage{hyperref} \hypersetup{unicode=false}.
    – Teddy
    Aug 11, 2012 at 14:14
  • Also with \usepackage[pdftex]{hyperref} it complains that xetex driver only supports unicode. Seven hells..
    – Teddy
    Aug 11, 2012 at 14:20
  • 14
    Try \usepackage[unicode,pdfencoding=auto]{hyperref} just before \begin{document}. Aug 11, 2012 at 15:29
  • You don't need xelatex with fontspec, you could also use lualatex. This is what I use and have no problem with moderncv.
    – raphink
    Aug 11, 2012 at 22:36
6

I had the same problem, when using options like pdftitle , pdfkeywords , . . . I changed to use pdfinfo and now everything is workng fine. the syntax is like this:

\hypersetup{
     pdfinfo={
        Title={My Title},
        Subject={My Subject},
        NewKey={Foobar},
        % ...
             }
           }

for more info you can refer to hyperrefdocumentation page 11.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .