bug#81606: Mojibake with UTF-8 file names
Eli Zaretskii <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
> Date: Sun, 16 Aug 2026 12:18:02 +0000 > Cc: [email protected], [email protected] > From: Werner LEMBERG <[email protected]> > > > >> Thanks. I also suggest that the AUCTeX documentation mentions the > >> importance of the 'coding:' cookie for master file names with > >> non-ASCII characters. > > > > I plan to install something like this. Does it make sense to you? > > > > +If you're using non-ASCII characters in the name of the master file and > > +Emacs doesn't detect the master file correctly, you should give Emacs a > > +hint about the correct coding of the current file like this: > > + > > +@example > > +%%% Local Variables: > > +%%% coding: utf-8 > > +%%% TeX-master: "ä-master" > > +%%% End: > > +@end example > > + > > I would be more strict. What about the following. > > Non-ASCII characters in the name of of the master file must use the > same encoding as the current input file itself. To make this > actually work, set the @code{coding} local variable accordingly; in > most cases, you want to use UTF-8 encoding. Example: This doesn't work, I think: the encoding of the current file is not known when latexenc looks for the name of the main file. That was the reason for the original problem in this bug. Or what am I missing?