vendredi 27 février 2015

How do I edit text in Cyrillic / Russian on OpenBSD?


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).


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?





Aucun commentaire:

Enregistrer un commentaire