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?

Teddy
  • 665
  • 1
    There are some changes which are not documented. But we need an example to see your error. At the moment we can guess. – Marco Daniel Aug 10 '12 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 '12 at 07:40
  • This is a minimal working example: http://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 '12 at 10:51

2 Answers2

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.

Ulrike Fischer
  • 327,261
  • 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 '12 at 14:01
  • I either can't disable this by \usepackage[unicode=false]{hyperref} or \usepackage{hyperref} \hypersetup{unicode=false}. – Teddy Aug 11 '12 at 14:14
  • Also with \usepackage[pdftex]{hyperref} it complains that xetex driver only supports unicode. Seven hells.. – Teddy Aug 11 '12 at 14:20
  • 14
    Try \usepackage[unicode,pdfencoding=auto]{hyperref} just before \begin{document}. – Ulrike Fischer Aug 11 '12 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 '12 at 22:36
  • I put \hypersetup{pdfencoding=auto} right after loading the document class that loads hyperref and it fixed the problem for me. – ptomato Feb 21 '13 at 21:59
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.