Following Richard advice, below posted source code of a small document. With the current lyx configuration I can insert a child document with the program listing input. The document is saved utf8. I can see accents on the pdf output, but the breaklines of the listings package does not seem to work and I do not why. A long line does not break at any place, despite breaklines=true param is set. Any help welcomed Thanks again.
<<<<<<<<<<<<<lyx source code>>>>>>>>>>>>>>>>>>> % Preview source code %% LyX 1.6.7 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[11pt,catalan]{report} \usepackage[T1]{fontenc} \usepackage[utf8x]{inputenc} \usepackage{listings} \usepackage[a4paper]{geometry} \geometry{verbose,tmargin=3cm,bmargin=2cm,lmargin=3.5cm,rmargin=2.5cm,headheight=2cm,headsep=1cm,footskip=1.5cm} \setlength{\parskip}{\bigskipamount} \setlength{\parindent}{0pt} \usepackage{calc} \usepackage{amsthm} \usepackage{amsmath} \usepackage{amssymb} \usepackage{esint} \makeatletter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands. \numberwithin{equation}{section} \numberwithin{figure}{section} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. \usepackage{verbatim} \usepackage{varioref} \usepackage{ucs} \usepackage{framed} \usepackage[T1]{fontenc} \usepackage{ucs} \usepackage[utf8x]{inputenc} \makeatother \usepackage{babel} \begin{document} Document d'exemple. document;settings;language;català document;settings;language;other utf8x No problem with accents on main document: áéíóú % \framebox{\begin{minipage}[t]{1\columnwidth}% Inserted child document with accents stored utf-8. Program listing input selected \scriptsize \lstinputlisting[breaklines=true,extendedchars=false]{childdoc-utf8} \scriptsize% \end{minipage}} \nocite{*} \end{document} <<<<<<<<<<<<<<<<<<<<<<utf8 saved file content: >>>>>>>>>>>>>>>>>>>>>>>>> Child document. Stored UTF8. Áéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèá éíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéí