What is the best way to use non-ASCII (say, Cyrillic) characters in a .sty file?
If it's used in a LaTeX file that uses \inputenc[utf8]{inputenc}
, than one can just use utf8 encoding in the .sty file and everything's fine. Or the other way round: one can add \RequirePackage[utf8]{inputenc}
to the .sty file. But in any case, the author of .tex file has to use the encoding used in .sty file.
Is there a way to specify encoding in the .sty file, so it may be used in a .tex file in any encoding?
(Recipe that is also compatible with XeLaTeX would be especially nice.)