Loading ...
Sorry, an error occurred while loading the content.

2472Re: Unicode conversion bug?

Expand Messages
  • Tony Mechelynck
    May 3, 2008
      On 04/05/08 03:06, T.P.S.Nakagawa wrote:
      > Thank you Tony.
      > 2008-05-04 8:08 (JST) , Tony Mechelynck sent follow message:
      > >> > Libiconv 1.9.2 is available precompiled from GnuWin32 from the page
      > >>
      > >> O.K. I install all GnuWin32 and add path to it's bin.
      > >> I erase old iconv.dll, result of all test pattern is same to old iconv.dll.
      > >
      > > Make sure to have iconv.dll (and possibly all GnuWin32 executables) in
      > > the PATH (which, on Windows, is a semicolon-separated list). How to set
      > > that depends on your Windows version. IIRC, in XP it is at "Control
      > > Panel -> System -> Advanced -> Environment Variables" or something similar.
      > Oh , Yes. ( My english is too poor, but not begenner of PC )
      > I see :fileencodings on gvim , and my _vimrc set
      > > if has('iconv')
      > > set
      > fileencodings=ascii,iso-2022-jp,utf-8,euc-jp,utf-16,cp932,java,ucs-2-internal,euc-jis0213,utf-16,ISO-8859-1
      > > endif
      > if not path success, `:fileencodings?` will return another value, is'not it?
      > best regards,
      > Nakagawa, a.k.a yaemon

      Yes, a Vim build compiled with +iconv/dyn will act as -iconv
      (has("iconv") == 0) if it cannot establish contact with _any_ iconv.dll
      so the other ":if" branch will be followed, and ":set fileencodings?"
      (not ":fileencodings" which returns an error) will display a different

      That 'fileencodings' setting makes me wonder:
      - Shouldn't it start with "ucs-bom" to detect those Unicode files which
      have a BOM?
      - Can "ascii" give a fail signal (doesn't Vim treat it as an alias for
      "latin1")? -- If it can, then it's OK there, but otherwise not.
      - What is "ucs-2-internal"? Won't it be detected as "utf-16" (which is a
      superset of UCS-2) by the "utf-16" entry three steps earlier?
      - Why is "utf-16" mentioned twice? (The second entry does no harm, but
      will never be used.)
      - Won't you ever receive UCS-2/UTF-16 files in little-endian ordering
      (which is standard on Intel ix86 and therefore on Windows)?

      Best regards,
      If everybody minded their own business, the world would go
      around a deal faster.
      -- The Duchess, "Through the Looking Glass"

      You received this message from the "vim_multibyte" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 25 messages in this topic