The algorithm2e package seems to be not compatible with LuaLaTeX. For example, compiling the following code produces an error.
\documentclass{article}
\usepackage{fontspec}
\usepackage{algorithm2e}
\begin{document}
foo
\end{document}
Output of lualatex:
...
! String contains an invalid utf-8 sequence.
l.778 \renewcommand{\@algocf@procname}{Proc
�dure}%
?
! Emergency stop.
Has someone an idea how to fix that? I have a lot of algorithms typeset and do not want to switch to another package just because of LuaLaTeX.
algorithm2e.styin the same directory, open it with an editor that can save it back in UTF-8. – Andy Nov 14 '11 at 15:56inputenc. Using non-ascii chars in a sty is simply a bad idea. – Ulrike Fischer Nov 14 '11 at 17:33procédurewhich is ok for french. A sty should be pure ascii and it doesn't matter how you save it as the result will be the same. ascii chars are encoded identically in utf8, ansinew, latin1 etc. – Ulrike Fischer Nov 14 '11 at 18:06