vimthaisoutheast-asian-languages

Vim 7.4 binary for Windows, can't process Thai characters. No multi_byte, has multi_byte_ime/dyn instead?



Like at least one other Vim / gVim 7.4 for Windows user, I'm going 'round and 'round in circles trying to get gVim to properly display Unicode. In my case, I have a .py file that contains Thai characters. For example, เมษายน.

My first thought was that in my Windows gVim instance, I merely need to duplicate the fileencodings settings from my Linux gVim instance, ala fileencodings=ucs-bom,utf-8,default,latin1. I also duplicated the Linux instance's termencoding=utf-8.

All that accomplished was that the Thai characters were displayed as a random string of "line noise" rather than, say, one empty box per Thai character.

As confirmed by posts by several gVim 7.4 for Windows users, in gVim 7.4 the :version command lists multi_byte_ime/dyn but NOT multi_byte. See, inter alia:

Have Vim fully support UTF-8 on Windows

This differs from the gVim 7.4 instance running in Linux where :version DOES list multi_byte but does NOT include multi_byte_ime/dyn.

Evidently multi_byte_ime is about input method whereas multi_byte seems to be about supporting multi-byte characters(?) Whatever the significance of the two different ":version" outputs, I simply can't get gVim 7.4 for Windows to display the Thai characters whereas gVim 7.4 in Mint Linux does it straightaway.

At this point I'm trying to figure out a way forward. I've gone 'round and 'round and 'round reading different forums and experimenting with various options that purport to enable gVim 7.4 for Windows to display the Thai characters. So far I've gotten nowhere.


Solution

  • Unpack iconv.dll and libintl.dll from the links provided on the vim download page, under iconv library and newer intl library and install them as directed on the aforementioned vim download page.

    Update:

    You will need to get iconv.dll from the win32 build of iconv. and intl.dll from the win32 build of gettext. You can access the files for both from SourceForge.

    First, follow the libiconv-win32 on the SourceForge page. Click on the latest version 1.9.1 as of the date of this answer. Click on that and download the zipfile. (Currently libiconv-1.9.1.bin.woe32.zip). The zipfile contains the file iconv.dll in the bin subdirectory. Put iconv.dll in the same directory as gvim.exe.

    Next follow the gettext-win32 link on Sourceforge page linked above. Click on the latest version (0.13.1 as of the date of this answer) and download the runtime zipfile (currently gettext-runtime-0.13.1.bin.woe32.zip). This zipfile contains the file intl.dll in the bin subdirectory. Copy that in the same directory as gvim.exe, renaming it as libintl.dll. This might overwrite a file that is already there.