Re: New to Vim, Japanese setup
- Rick Frankum <frankum@...> wrote:
I have only some of the answers you are looking for. Probably someone else
will jump in to fill in what I didn't know.
>+multi_byte_ime/dyn means that your version of Vim can use an "input method"
> I'm trying to figure out how to configure vim on my system.
> I'm running Windows XP (English menus, but with Japanese
> support enabled) and would like to edit Japanese
> files (S-JIS enc), but the documentation is slightly
> confusing. I'd appreciate any help that the list can offer.
> 1) I downloaded the self-extracting binary from vim.org. The
> documentation says to use :version to check if the multi-byte
> setting is enabled, but +multi_byte_ime/dyn is reported. Is this
> the same setting?
to input multi-byte characters (for example, kanji) on W32 provided that
some external library (some .dll file, on Windows) is present at run-time.
As I understand it, such a capability can only be present if "ordinary"
multi-byte handling is (at least dynamically) included. But you can check
it: To check for one particular capability such has +multi_byte, do
If the answer is non-zero (1, usually) the feature is present. If the answer
is 0 the feature is absent.
Note:The gvim version I am using also mentions +multi_byte_ime/dyn (and
neither +multi_byte nor -multi_byte) in the :version report. I know that it
has multi-byte support because the :echo statement above reports 1, and I
use this gvim version for Cyrillic editing in utf-8, which requires the
+multi_byte capability but not necessarily IME support.
>I don't know, I only use precompiled versions of gvim. But I think that
> 2) If not, how can I build a multibyte enabled vim on my
> machine? The "do-it-yourself" files at vim.org seem to be
yours has the required capability.
> 3) If I open the S-JIS file in vim, I get raw garbage. No
> amount of setting the termencoding or encoding will result in
> readable characters. Is there a way to fix this?
:if &termencoding == "" | let &termencoding = &encoding | endif
:edit ++enc=sjis filename
If it works, try
to see if vim is set to recognise sjis when opening an existing file for
> My current workaround is to load the file in Netscape just
> so I can read it, but I'd love to have a Japanese-aware
> Thanks for any help,
> --Rick Frankum
Summary of where to look for help on the above:
and follow the links from there.
- Tony Mechelynck wrote:
> I have only some of the answers you are looking for. Probably someone elseI appreciate it!
> will jump in to fill in what I didn't know.
>>I'm trying to figure out how to configure vim on my system.To update: the vim I have is indeed multibyte-enabled. The big
>>I'm running Windows XP (English menus, but with Japanese
>>support enabled) and would like to edit Japanese
>>files (S-JIS enc), but the documentation is slightly
>>confusing. I'd appreciate any help that the list can offer.
problem appears to be that I'm not editing S-JIS files but
in fact EUC-jp. When I run vim under Windows it doesn't
recognize (I tried :set encoding=euc-jp) the encoding,
and when I run it under Cygwin I still get garbage (though
it _does_ recognize euc-jp but not cp932).
Hiroji Kimura writes:
> http://www.kaoriya.net/#VIM6If I can't get the standard version working, I'll try this. What's
> Try the above link. That's what I use to edit Japanese.
a .bz2 extension, though?
Eric Long writes:
> When you say you get raw garbage, does that mean you see a lot ofThe garbage I refer to is mostly half-width katakana and dots.
> accented letters, or do you get a lot of stuff like ~B and ~K
> (or perhaps <82> and <8b>) ? If you have the accented letters it'll
> probably work with the right font, but if you have the ~B and ~K it
> means the encoding isn't getting set right.
Thanks again for the help,
- On Mon, Oct 06, 2003 at 01:13:40AM +0900, Rick Frankum wrote:
> To update: the vim I have is indeed multibyte-enabled. The bigYou need iconv.dll to handle euc-jp.
> problem appears to be that I'm not editing S-JIS files but
> in fact EUC-jp. When I run vim under Windows it doesn't
> recognize (I tried :set encoding=euc-jp) the encoding,
> and when I run it under Cygwin I still get garbage (though
> it _does_ recognize euc-jp but not cp932).
You also need to change "fileencoding", not "encoding". "encoding"
represents the internal representation, and should be set to "utf-8".