# Encoding problem with accents and inputenc package

I have this problem, it seems i'm doing something wrong while writing letters with accents like "è", on that line the compiler says: package inputenc Error: unicode char \u8:èun not set up for use. This happens when i use my latex editor, compiling the same code with an R sweave file on Rstudio it works normally and i got my accents on letters.

the code is this one

\documentclass[12pt,a4paper,oneside,openright]{book} %oneside versione segreteria
\usepackage[a4paper,top=2cm,bottom=2cm,left=3cm,right=2.5cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,italian]{babel}
\usepackage{bm}
\usepackage{amsmath}
\usepackage{mathrsfs}
%\uspackage{graphicx}
\usepackage{hyperref}

\begin{document}

%________________________________________________________________

\frontmatter

%space for abstract

\pagestyle{plain}
\tableofcontents

%_______________________________________________

\mainmatter

\pagestyle{plain}

%Primo Capitolo

\chapter*{Introduzione}

L'accrescimento è

\end{document}

• Are you sure the file is UTF-8 encoded? – egreg Jun 1 '16 at 14:36
• what do you mean? sorry i'm not an expert on LaTeX. It's that i always put that kind of preamble and it always worked. – Run like hell Jun 1 '16 at 14:50
• What editor are you using? – egreg Jun 1 '16 at 14:53
• TeXShop, always used it – Run like hell Jun 1 '16 at 14:57
• If you haven't changed its preferences, TeXShop doesn't save in UTF-8. Remember to add % !TEX encoding = UTF-8 Unicode at the start of your files. Do it and save the file; close and reopen it, then try running LaTeX on it. – egreg Jun 1 '16 at 14:59

% !TEX encoding = UTF-8 Unicode