Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • You should also try iso-8859-1. C-x RET c iso8859-1 RET C-x C-f <filename> RET should open it with that coding system. The coding system is indicated on the mode line at left as 1: .With some experience, you can tell what coding system was used, when you open the file with M-x find-file literally or with od -c from the command line and looking at the non-ascii chars. Commented Nov 2, 2021 at 21:02
  • The file I'm testing this with is a DOS-line termination file. It is identified as iso-8859-1. I presume that file was created with a pre-Unicode coding system most probably in a German speaking country. Commented Nov 2, 2021 at 21:38
  • I found out that loading the file in Firefox detects the encoding, which turned out to be GBK (simplified chinese). Knowing the encoding I can then use the method you described to open the file with GBK encoding and then I can tried to read the Chinese just fine ;-) Commented Nov 2, 2021 at 21:51
  • @Nick if you turn your answer in using the universal-coding-system-argument command into an answer I'll accept it. Commented Nov 2, 2021 at 22:04
  • I'll try, but it's going to take me a few days: writing a good answer is different from throwing out crazy suggestions in a comment :-) Commented Nov 3, 2021 at 3:34