Justin Dearing wrote:
> I'd like to edit EBCDIC encoded files in VIM on windows vim --version shows 
> this:
>
> VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 16 2015 08:44:57)
> Included patches: 1-872
> Compiled by <alex...@gmail.com>
> Huge version without GUI.  Features included (+) or not (-):
> <snip/>
> -ebcdic          +mouse           +smartindent     -xim
> <snip/>
>
> I cloned the git repo and configure --enable-ebcdic was not an option. 
> Looking at src/auto/configure, it looks like ebcdic support is enabled if 
> ASCII support is not present. Is there an option to turn it on?
>
I haven't used EBCDIC in decades, I'm afraid.   I mostly use Scientific
Linux.  I have some leftover script that still seems to work:

"  editing EBCDIC {{{2
augroup EBCDIC
 au!
 au BufReadPre  */EBCDIC/*  :let g:binkeep= &bin|set bin
 "au BufReadPost */EBCDIC/*  :%!iconv -f EBCDIC-US
 au BufReadPost */EBCDIC/*  :%!dd conv=ascii
 au BufReadPost */EBCDIC/*  :let &bin= g:binkeep|unlet g:binkeep
 "au BufWritePre */EBCDIC/*  :let g:binkeep= &bin|set bin|%!iconv -t
EBCDIC-US
 au BufWritePre */EBCDIC/*  :let g:binkeep= &bin|set bin|%!dd conv=ebcdic
 au BufWritePost */EBCDIC/* :let &bin= g:binkeep|unlet g:binkeep
augroup END

So, I have an EBCDIC directory; anything in it is, presumably EBCDIC. 
Still works with the vim I use. Clearly, its using system tools (iconv,
dd) which you're unlikely to have under Windows, unless cygwin happens
to provide them and you use cygwin.

So, if its of use, enjoy!  If not, ignore at will.

Chip Campbell

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to