I have an html file which is shift-JIS encoded (Japanese), and I cannot read it under vim. Setting enc=cp932 or enc=sjis generates garbage. The file looks fine in emacs, so I guess this is vim specific. What can I do to read it as is (besides converting it to a sane encoding like utf-8).
Share
You should not ever want to change
encodingoption: it is for internal representation of strings and should be changed only if current encoding does not contain characters present in desired encoding. If you sometimes edit files withsjisencoding, thenBe sure, that
fileencodingsoption containssjis: put something like that intovimrc:e ++enc=sjis /path/to/file. Or, if file is already opened, usee! ++enc=sjis(without filename).