1

After building this code:

% !TeX program = xelatex
\documentclass{report}        % or some other class
\usepackage{algorithm2e}
\begin{document}
some text
\end{document}

I get the following warning in the log file:

...
("C:\Program Files\MiKTeX 2.9\tex\latex\base\ifthen.sty"
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
)
Invalid UTF-8 byte or sequence at line 1311 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 1313 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 1315 replaced by U+FFFD.

First, the ifthen.sty file I have is only 152 lines long. Second thing is, that I didn't include it in my document. has anyone experienced anything similar?

I use Win7 64bit, TexStudio 2.12.2.

3
  • 2
    The ifthen package gets included by algorithm2e. If you have a look at the source code of the algorithm2e package, you can see that the lines raising the warnings contain an ç and ü. – epR8GaYuh Jun 1 '17 at 14:28
  • 2
    How to read the log file: if the opening ( has already been closed by a matching ), then the message is not from opening that file. Look back to the ( that opens the block with those warning messages. – ShreevatsaR Jun 1 '17 at 14:32
  • Silly me. Indeed, after changing the encoding, it works fine. Thanks, guys. – Sweidán Omár Jun 1 '17 at 14:41
3

They're just annoying warnings; the package should have

1307 \DeclareOption{turkish}{%
1308 \renewcommand{\listalgorithmcfname}{Algoritma Listesi}%
1309 \renewcommand{\algorithmcfname}{Algoritma}%
1310 \renewcommand{\algorithmautorefname}{algoritma}%
1311 \renewcommand{\algorithmcflinename}{\c{c}izgi}%
1312 \renewcommand{\algocf@typo}{}%
1313 \renewcommand{\@algocf@procname}{Prosed\"ur}%
1314 \renewcommand{\@algocf@funcname}{Fonksiyon}%
1315 \renewcommand{\procedureautorefname}{prosed\"ur}%
1316 \renewcommand{\functionautorefname}{fonksiyon}%
1317 \renewcommand{\algocf@languagechoosen}{turkish}%
1318 }%

instead of using Latin-1 characters for ç and ü. Turkish users will have surprises if they don't change manually those fixed words when using UTF-8 input.

LuaLaTeX users are in a worse situation, because the characters will issue errors and not warnings:

! String contains an invalid utf-8 sequence.
l.1311 \renewcommand{\algorithmcflinename}{
                                         ?izizgi}%

Unfortunately, there's no workaround for avoiding this while reading the package, so the warnings/errors cannot be skipped.

There is another error in algorithm2e (a spurious { at line 1061) that can cause memory overflow, besides issuing a warning at the end of the job. Making the bugs known to the package author seems useless.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.