Sunday, May 15, 2016

Re: Vim can't recognize text file, but Notepad++ can

On 2016-05-15 19:08, 'Suresh Govindachar' via vim_use wrote:
> I exported the entire Windows registry -- resulting text file is
> about 500 MBytes. I can open this text file in Notepad++ -- but
> opening it in Vim results in just tons of @ signs.

Does the content alternate between "@" signs and actual content
characters? It sounds suspiciously like a UTF-16 file (Windows likes
to call this "Unicode") that Vim is reading yet somehow
misinterpreting. Is your vimrc trying to set the 'encoding' or
'fileencoding' settings in an incongruous way?

You might try

:e ++enc=utf16 file.txt

to force Vim to use utf16 to open the file. It would also help to
know what vim outputs when you issue

:set encoding? fileencodings?

-tim




--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: