Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
Using non ASCII characters in author names and titles within hyperref pdfinfo

\documentclass[12pt,a4paper]{mwrep}
\usepackage{polski}
\usepackage[utf8]{inputenc}
\usepackage[hidelinks,unicode,pdftitle=Some title żźćąęśćół]{hyperref}
\begin{document}
Text
\end{document}

How can I make pdftitle correctly generated? I'm getting (checked with Adobe Reader X):
Sometitle»¹¢¡¦±¢ó
There are no spaces and there are fizzled Polish diacritics. How can this be fixed?

share|improve this question

marked as duplicate by diabonas, doncherry, egreg, Seamus, lockstep Nov 24 '11 at 18:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
The spaces are kept if you put the title in braces. If you compile with lualatex or xelatex the Polish diacritics work. I don't how to make it work with pdflatex. –  Torbjørn T. Nov 21 '11 at 18:09

1 Answer 1

up vote 11 down vote accepted

Use \hypersetup to set up strings:

\documentclass[12pt,a4paper]{mwrep}
\usepackage{polski}
\usepackage[utf8]{inputenc}
\usepackage[hidelinks,unicode]{hyperref}
\hypersetup{pdftitle=Some title żźćąęśćół}
\begin{document}
Text
\end{document}

This is recommended at the hyperref manual.

share|improve this answer
1  
It seems that the option unicode works for the strings set up in \hypersetup, but not for the strings set up in options. This is probably the reason why the method you recommend works. –  Boris Nov 21 '11 at 18:24
    
Thanks for your solution. –  Ichibann Nov 21 '11 at 18:24
2  
@Boris: The optional argument of \usepackage is ready by the LaTeX kernel, so hyperref cannot change scanning of the argument. The argument of \hypersetup will be read under control of hyperref. hyperref may e.g. change encoding before reading the argument. –  Schweinebacke Nov 22 '11 at 1:00
    
@schweinebacke yes, this is what I meant –  Boris Nov 22 '11 at 5:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.