[Tex/LaTex] French accents not showing correctly in table of contents

accentsfrenchpdftable of contentstexmaker

I am writing in French and there are many accents. I can see them in the whole document except in the table of contents.

When I compile and preview my document in Texmaker, I can see the french accent in the table of contents:

enter image description here

But when I check the actual pdf that is produced with Adobe Acrobat Reader or Preview/Aperçu (Mac OS X 10.6.8 default pdf viewer), the accents are replaced by special characters as shown on the screenshot below:

enter image description here

This is a part of my preamble:

\documentclass[12pt,a4paper,twoside,french]{article}
\usepackage{mathptmx}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{prettyref}
\usepackage{hyperref}
\usepackage{babel}
\addto\extrasfrench{%
   \providecommand{\og}{\leavevmode\flqq~}%
   \providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
}

The TOC file entries look like:

\select@language {french}
\contentsline {section}{Introduction}{1}{section*.2}
\contentsline {section}{\numberline {1}Contexte actuel}{2}{section.1}
\contentsline {subsection}{\numberline {1.1}Contexte socio-\'economique}{2}{subsection.1.1}

How can I fix it?

Best Answer

Try loading:

\usepackage[latin1]{inputenc}

If this doesn't work, then please try:

\usepackage[applemac]{inputenc}