<div dir="ltr"><div>I think that should be taken up with the xstring maintainers.</div><div><br></div><div>I don't think there is any reasonable way to say you can comment out parts of a file in a different encoding.</div><div><br></div><div>The file encoding specifies the byte stream interpretation before any tex tokenization</div><div>If the file can not be interpreted as utf-8 then it can't be interpreted at all. Even replacing by 
U+FFFD <br></div><div>is being lenient.</div><div><br></div><div>David</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 21 Feb 2021 at 11:04, jfbu <<a href="mailto:jfbu@free.fr">jfbu@free.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
consider this<br>
<br>
\documentclass{article}<br>
\usepackage{xstring}<br>
\begin{document}<br>
\end{document}<br>
<br>
and call it xexstring.tex<br>
<br>
Then xelatex xexstring triggers 136 warnings of the type<br>
<br>
Invalid UTF-8 byte or sequence at line 35 replaced by U+FFFD.<br>
<br>
Looking at file<br>
<br>
/usr/local/texlive/2020/texmf-dist/tex/generic/xstring/xstring.tex<br>
<br>
I see that this matches with use of latin-1 encoded characters in comments.<br>
<br>
Notice that it is a not a user decision here to use a latin-1<br>
encoded file.<br>
<br>
In fact I encountered this in a file I was given where<br>
xstring package was loaded by another package.<br>
<br>
Regards,<br>
<br>
Jean-François<br>
<br>
<br>
</blockquote></div>