<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Maybe you are the maintainer?</div>
<div id="x_appendonsend"></div>
<div style="direction: ltr; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="direction: ltr; display: inline-block; width: 98%;">
<div id="x_divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);"><b>De :</b> David Carlisle <d.p.carlisle@gmail.com><br>
<b>Envoyé :</b> dimanche 12 mai 2024 15:51<br>
<b>À :</b> outlook user <RACP@outlook.fr><br>
<b>Cc :</b> texhax@tug.org <texhax@tug.org><br>
<b>Objet :</b> Re: Babel invoke inputenc where inputenc is not designed for xetex or luatex</span>
<div> </div>
</div>
<div style="direction: ltr;">in texlive 20204 (and probably all earlier versions)</div>
<div style="direction: ltr;">any use of \usepackage[arabic]{babel} will raise errors with</div>
<div style="direction: ltr;">lualatex or xelatex as the arabi package files are not in UTF-8</div>
<div style="direction: ltr;">You should raise this with the arabi package maintainer.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">with lualatex:</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">(/usr/local/texlive/2024/texmf-dist/tex/latex/arabi/arabicore.sty<br>
Arabi Core switching commands v1.0 2006/01/01 (may still change) <br>
! String contains an invalid utf-8 sequence.<br>
l.137 \ifcase#1\or<br>
��������� � \ \or �����������^^@�^^@^^@</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">xelatex recovers from that but then errors on</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">! Package inputenc Error: inputenc is not designed for xetex or luatex.<br>
(inputenc) only UTF-8 supported.<br>
<br>
</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">I _think_ the recommended way to specify the language these days is</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">\documentclass{article}<br>
<br>
\usepackage{babel}<br>
\babelprovide{arabic}<br>
<br>
\begin{document}<br>
<br>
x<br>
\end{document}</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">which allows babel to keep control.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">On Sun, 12 May 2024 at 14:31, outlook user <<a href="mailto:RACP@outlook.fr" id="OWA21fdd08a-5e0d-beb5-43f5-f708fa8ffaa5" class="x_OWAAutoLink">RACP@outlook.fr</a>> wrote:</div>
<blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left: 1px solid rgb(204, 204, 204);">
<div style="direction: ltr; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
> (inputenc) only UTF-8 supported.</div>
<div style="direction: ltr; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
></div>
<div style="direction: ltr; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
> See the inputenc package documentation for explanation.</div>
<div style="direction: ltr; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
> Type H <return> for immediate help.</div>
<div style="direction: ltr; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
> ... </div>
<div style="direction: ltr; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
> </div>
<div style="direction: ltr; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
> l.164 \endinput</div>
<div style="direction: ltr; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
</div>
<div style="direction: ltr; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
> For xelatex or lualatex save the document in UTF-8 encoding</div>
<div style="direction: ltr; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
> and do not use inputenc, or use the [utf8] option.</div>
<div style="direction: ltr; font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
On version 1.16.0 from TeX Live distribution version 2023 using LUALaTeX 2023.8.28. It appears when `\usepackage{babel}` is modified to `\usepackage[arabic]{babel}`<br>
<br>
>From what I understand LUATeX use by default UTF-8 and using inputenc will conflict with it because it tries to re-define the encoding which is locked in LUA/Xe, so will end up in a "crash". So Babel (or whatever invoke it) shouldn't do it (I think it tries
to use cp1256 here, despite not asking for it) when not using PDFTeX (or whatever needs it), like on that case. And worse, some calls takes priority so re-using inputenc to ask for UTF-8 won't correct the problem because it takes the first call only</div>
</blockquote>
</body>
</html>