On 15/05/2008, at 11:43 PM, Rainer Schöpf wrote: > Are your proposing something like this at the beginning of > inputenc.sty: > > \ifThisIsXeTeX > \switchInputEncodingTo{\optarg} > \endinput \fi > > ? If so, is there a simple implementation of \ifThisIsXeTeX ? Pretty much, yes. The ifxetex package provides \ifxetex (simply by checking for the presence of \XeTeXversion). Here's some code that does approximately the right thing: (intended to be a self-contained package in a XeTeX-exclusive search path to override the normal inputenc.sty) %%%%%%%%%%%%%%%%%%%%%%%%%%%% \ProvidesPackage{inputenc} [2008/05/15 v0.1 XeTeX-specific inputenc package] \typeout{% Loading a XeTeX-specific package to override LaTeX's inputenc package.} \RequirePackage{ifxetex} \RequireXeTeX \DeclareOption*{% \PackageWarning{inputenc}{^^J\space\space XeTeX input encoding set to '\CurrentOption' for the rest of^^J% \space\space '\jobname' and all subsequent files to be read.^^J% This message occured}% \XeTeXinputencoding "\CurrentOption"% \XeTeXdefaultencoding "\CurrentOption"% } \ExecuteOptions{utf8} \ProcessOptions %%%%%%%%%%%%%%%%%%%%%%%%%%%% It's not very robust at the moment (i.e., the names XeTeX uses don't always map to the inputenc names; see <http://www.iana.org/assignments/character-sets > for the full list of encoding names) so I'll have to do something about that. But that's the general approach. I'm happy to maintain such a package that's intended to live in tex/ xelatex/inputenc.sty if you like; otherwise, it should probably be rolled into inputenc.sty proper. Many thanks, Will