bug#81606: Mojibake with UTF-8 file names
Eli Zaretskii <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
> From: Arash Esbati <[email protected]> > Cc: [email protected], [email protected] > Date: Sun, 16 Aug 2026 14:00:16 +0200 > > Werner LEMBERG <[email protected]> writes: > > > 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? > > --8<---------------cut here---------------start------------->8--- > diff --git a/doc/auctex.texi b/doc/auctex.texi > index 07ad346c..16e6e228 100644 > --- a/doc/auctex.texi > +++ b/doc/auctex.texi > @@ -4717,6 +4717,17 @@ your files. > %%% End: > @end example > > +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 suggest to remove the second part of the condition: the 'coding:' cookie is recommended whenever the main file has non-ASCII characters in its name, regardless of whether Emacs can or cannot detect the encoding.