ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Баталов Григорий" <bga@kgok.murmansk.su>
To: mandrake-russian@altlinux.ru
Subject: [mdk-re] Как править CP1251 в mcedit
Date: Mon Jun 18 03:46:00 2001
Message-ID: <20010618035552.7d144cbd.bga@kgok.murmansk.su> (raw)

                 Господа!
    Не сочтите за маньяка. Я тут поискал в форумах,
  что народ думает о mcedit и windows-кодировке.
    Есть довольно банальный выход:
  вставить в user menu скрипт, который конвертирует
  файл в koi8, вызывает mcedit, и конвертирует обратно.
    Для этого нужно добавить в ~/.mc/menu примерно
  следующее:
----------------->8------------------------
w       Convert CP1251=>KOI8-R and edit 
	cp %f "$HOME/tmp/%f.win" ; 
	iconv -fCP1251 -tKOI8-R "$HOME/tmp/%f.win" > "$HOME/tmp/%f.koi";
	cp "$HOME/tmp/%f.koi" "$HOME/tmp/~%f" 
	mcedit "$HOME/tmp/~%f" 
	if ! cmp -s "$HOME/tmp/~%f" "$HOME/tmp/%f.koi"
	  then
	   iconv -fKOI8-R -tCP1251 "$HOME/tmp/~%f" > "$HOME/tmp/%f.win" 
 	   cp "$HOME/tmp/%f.win" %f 
	fi 
	rm "$HOME/tmp/%f.win" "$HOME/tmp/%f.koi" "$HOME/tmp/~%f"
	
-----------------8<------------------------
   Вот так все просто.

-- 
Баталов Григорий.



             reply	other threads:[~2001-06-18  3:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-18  3:46 Баталов Григорий [this message]
2001-06-18 15:25 ` [mdk-re] ëÁË ÐÒÁ×ÉÔØ CP1251 × mcedit Serge Skorokhodov
2001-06-18 16:12   ` [mdk-re] Как править CP1251 в mcedit Баталов Григорий
2001-06-18 16:51     ` Re[2]: [mdk-re] ëÁË ÐÒÁ×ÉÔØ CP1251 × mcedit Serge Skorokhodov
2001-06-18 16:43   ` [mdk-re] Re[2]: [mdk-re] Как править CP1251 в mcedit Sergey Krivulja
2001-06-18 16:51     ` [mdk-re] Re[2]: [mdk-re] ëÁË ÐÒÁ×ÉÔØ CP1251 × mcedit Serge Skorokhodov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010618035552.7d144cbd.bga@kgok.murmansk.su \
    --to=bga@kgok.murmansk.su \
    --cc=mandrake-russian@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git