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: Fri, 14 Aug 2026 01:02:54 +0200 > > Eli Zaretskii <[email protected]> writes: > > > If you instrument latexenc-find-file-coding-system with Edebug, does > > it get called in the above scenario? > > Yes, it gets called inside the files I sent. > > > If so, can you step through the code and tell what happens, and also > > show the Lisp backtrace, so we know how this function is called and by > > what code? > > I can't tell how where the caller is, it doesn't throw an error so I > don't see a backtrace. Edebug has a command to produce a backtrace; please use that. > What I can tell is that while the funcion is > called, the problematic part is: > > (let ((file (if (re-search-forward > "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\"" > nil t) > (match-string 2) > > The search is successful and (match-string 2) returns > > Result: "\303\244.tex" > > I would have expected a plain "ä.tex". You are aware that \303\244 is the UTF-8 sequence for ä, are you? The above seems to mean that the search is done on a unibyte buffer or something.