1

I'm working on a LaTeX document in emacs (27.1) that contains english as well as sanskrit (devanagari) text. After running aspell on the document, I ran M-x revert-buffer and attempted to save the document, when emacs popped a warning window that said something like "These bytes cannot be written". I may have ignored the warning and written the file in raw-text-unix format. Now when I open the file, I see a bunch of numbers. E.g

How text appears in emacs

I selected the entire text in this file and ran M-x recode-region

Text was really in: utf-8
But was interpreted as: raw-text-unix

After this, emacs displays unicode (devanagari) text as expected but these changes do not persist. Whenever I relaunch emacs and open this file, I just see bytes (and not unicode characters). How do I fix this?

EDIT: The file command shows the the current file has a non-iso extended-ascii text. This is different from my other latex files. E.g:

✗ file naishadham-chap4.tex # doc with problem
naishadham-chap4.tex: LaTeX document text, Non-ISO extended-ASCII text, with very long lines, with LF, NEL line terminators
✗ file naishadham-chap3.tex
naishadham-chap3.tex: LaTeX document text, UTF-8 Unicode text

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.