1

I'm trying to make it possible to easily edit text in Cyrillic / Russian on a remote OpenBSD 5.2 amd64.

I'm using emacs-21.4p18-no_x11, which doesn't show any Cyrillic characters whatsoever when I try opening up a file with a windows-1251 encoding (instead showing question marks and sometimes even randomly mangling the file when a save is attempted), unless I start it as env LANG=bg_BG.CP1251 emacs (for some reason, there's no ru_RU.CP1251 in /usr/share/locale/) and PuTTY to Win1251 (Cyrillic); however, this only works in displaying the characters, not for typing any characters — switching the local keyboard to Russian and typing into emacs causes various random internal commands to be executed, even though quitting emacs and using cat(1) works without any issues for Russian input (which could then be opened up in emacs and copy-pasted from the temp file to the real one, which is very cumbersome and unproductive).

(FWIIW, I've also tried mg(1), but it shows up Russian characters as \315 etc, and doesn't let you type in Russian, either.)

  • If the files I'm editing are nginx.conf, is there a way to automatically specify the encoding for emacs? All the File Variables examples appear to start with a mode, but there's no mode for nginx.conf.

  • How do I make emacs / mg load files in either windows-1251 or koi8-r, and show them in UTF-8?

  • How do I make emacs / mg accept Cyrillic input?

  • What does the first character in the modeline show when you load the file? Did you try revert-buffer-with-coding-system? I use phonetic (translit) when I type in Russian. That is I use set-input-method and choose cyrillic-translit (easier for me, because I don't know Russian keyboard key locations, but there are other input methods, you should be also able to emulate ЙЦУКЕН if you like. Also, Emacs 21 is really old... it's from something like 7 years ago, maybe even more... – wvxvw May 14 '15 at 7:49
  • Actually, Emacs 21.4 was released in 2005... – wvxvw May 14 '15 at 7:52
  • I don't have Russian letters on my keyboard, but I still seem to blindly remember where they're supposed to be (outside of the punctuation, apparently). – cnst May 14 '15 at 7:52
  • @wvxvw, yes, it appears to be the less bloated version, so, it's still available in all recently OpenBSD releases. – cnst May 14 '15 at 7:53
  • If you set input method to cyrillic-jis-russian you will be typing in ЙЦУКЕН layout, except, you won't need to send Cyrillic over the wire (which I suspect to be the problem). This is at least worth checking out. I would still recommend updating Emacs to a newer version. If there's something you don't need in it, I'd try to disable it during compile instead of using something that is known to have lots of bugs fixed over the last decade. – wvxvw May 14 '15 at 8:03

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.