# Special characters from my language are not correct when compiled with pdfLatex

I have difficulties while using special symbols from my language such as š, č, ť. I use this statement in my document:

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[czech,british,slovak]{babel}
\usepackage{lmodern}

\begin{document}
š č ť ž ý á í é ä ú ô ň ď ľ
\end{document}


The output file looks all right (exactly the same characters as above), however when I copy the text from the output pdf file and paste it to any text editor, I see only following:

š c t ž ý á í é ä ú ô n d l

So a part of symbols is incorrect in the output.

I use pdfLatex for the compression. When I use Latex+dvips+ps2pdf, everything is allright. However I need to use pdfLatex for various reasons and I believe that the solution must be simple.

Note that I use \usepackage{lmodern}. Without that the copied and pasted output would be totally broken (both with Latex and pdfLatex compression it would be ² £ ´ º ý á í é ä ú ô ¬ ¤ ©).

Use cmap package before fontenc.