Wednesday, April 25, 2012

Re: Problem displaying euc-jp encoded file

On Wednesday, April 25, 2012 8:42:50 AM UTC-5, esquifit wrote:
> I downloaded the Japanese dictionary file "SKK-JISYO.M" [1] which is
> required for the skk vim plugin [2].
>
> [1] http://openlab.jp/skk/wiki/wiki.cgi?page=SKK%BC%AD%BD%F1#p5, first
> link "download"
> [2] http://www.vim.org/scripts/script.php?script_id=3118
>
> The first line in the file states that it is encoded in euc-jp. This
> is also the encoding detected by Firefox when the file is loaded in
> the browser. The ascii, kana and kanji characters are correctly
> displayed in Firefox. However I cannot get vim to display the
> non-ascii characters. Note that I have Japanese fonts installed that
> work just fine with other files with Japanese text.
>
> I played around with enc, fenc & Co. in all possible combinations and
> tried all supported Japanese encoding systems to no avail. Any idea?
>

What is the exact command you used to "play around" with enc, fenc, etc.? What is the exact command you used to open the file?

If this is a valid euc-jp file, this command should open it just fine:

:e ++enc=euc-jp SKK-JISYO.M

However, executing this command, I get the message,

"SKK-JISYO.M" [NOT converted][ILLEGAL BYTE in line 33][unix]

I note in :help encoding-names that euc-jp is only supported on Unix, so I tried using cp932 instead, as well as the "japan" alias. I get conversion errors for these as well in the same line.

I suspect your issue may be that you are on Windows and Vim cannot use euc-jp on Windows, at least according to the help. I'm not sure if there's a way around this. Perhaps there is an external utility you could use to convert the euc-jp document into a different encoding which Vim can understand, like cp932 or utf-8.

Otherwise, the issue may be that the file is not actually encoded as expected.

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

No comments:

Post a Comment