I'm very new to latex and I'm trying to write a latex document in polish. It contains diacritical marks such as "ą" or "ś" and it all works fine until I try to add some Matlab code to the document. My code also contains polish letters (for example in plot titles) and when I'm trying to create pdf I get a message like the one bellow for every line of Matlab code that contains some polish letters
! Package inputenc Error: Invalid UTF-8 byte sequence. See the inputenc package documentation for explanation. Type H for immediate l.80 xlabel('częstotliwość próbkowania');
Does anyone know what to do to use a diacritical mark in Matlab code in latex? Here's what I use for my MatLab code:
\definecolor{greenMatlab}{RGB}{75,150,0}
\definecolor{stringColor}{RGB}{170,55,241}
\lstset{breaklines=true,
framextopmargin=50pt,
frame=bottomline,
language=Matlab,
breaklines=true,
morekeywords={matlab2tikz},
keywordstyle=\color{black},
identifierstyle=\color{black},
stringstyle=\color{stringColor},
commentstyle=\color{greenMatlab},
showstringspaces=false,
numbers=left,
numberstyle={\tiny \color{black}},
numbersep=9pt,
emph=[1]{for,end,break},
emphstyle=[1]\color{blue},
}