# How to use accentend characters in newfloat

I am using \newfloat to redefine numbers of Figures, as explained here. I used the following code:

\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{newfloat}
\DeclareCaptionType[fileext=ext]{Grafico}
\begin{document}


And worked. But I would like that the captions of the new floats to be called as Gráfico 1 - When I try: \DeclareCaptionType[fileext=ext]{Gráfico} I got an error.
How can I do it?

I think you're misunderstanding how newfloat works.

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{newfloat}

\DeclareFloatingEnvironment[
fileext=grf,
listname={Lista de gráficos},
name=Gráfico,
]{grafico}

\begin{document}

\listofgrafico

\begin{grafico}[htp]
\centering

\includegraphics[width=2cm]{example-image}

\caption{Ejemplo de gráfico}

\end{grafico}

\end{document}


I used utf8 because my system is set up for it. You should switch, too.