bug#81606: Mojibake with UTF-8 file names
Arash Esbati <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
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. 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". With the search result above, things start going wrong since `latexenc-main-file' carries the wrong value further down in the function. > P.S. The test file doesn't have the line which > latexenc-find-file-coding-system is supposed to use for determining > the encoding, so I'm not sure it is relevant. See above. The function isn't called if the file has this local variable: %%% coding: utf-8 I can't tell why, though. Best, Arash