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

Problems converting to utf-8

Expand Messages
  • RampaL@aimtec.cz
    gvim 6.0, Win2k I try to convert text with czech national characters to utf-8 with ++enc option of write command. It seems that vim converts chars as if they
    Message 1 of 5 , Nov 13, 2001
      gvim 6.0, Win2k

      I try to convert text with czech national characters to utf-8 with
      ++enc option of write command. It seems that vim converts chars as
      if they are in cp1252 (Latin1) instead of cp1250 (Latin2).

      My setup:
      OS is set to Czech locale (:language returns "Czech_Czech Republic.1250")
      encoding=cp1250
      termencoding=cp1250
      guifont=courier_new_CE:h9 (which is czech one)
      :version says +multi_byte is there

      I input some czech characters with this setup (succes). Then I use
      command :w ++enc=utf-8 c:\temp\test_utf-8.txt. Vim announces that
      file was converted and written. But there are wrong bytes in the
      file, e.g. instead of LATIN SMALL LETTER E WITH CARON (011B in
      unicode) there is LATIN SMALL LETTER I WITH GRAVE (00EC in unicode).
      EC is the code for LATIN SMALL LETTER E WITH CARON in cp1250.

      I assume there is some misconfiguration on my side?


      I also am not able to input any national character while using
      encoding=utf-8 and termencoding=cp1250 (more exactly only some are
      shown, and are wrong).

      This has perhaps same reason as first problem.

      Is there some way for me?

      Thanks,
      Lukas Rampa
    • Ron Aaron
      ... Do you have the iconv.dll ? Or are you using the internal Windows functions? FWIW, you can get the latest iconv.dll (compiled by me, version 1.7.0.1)
      Message 2 of 5 , Nov 13, 2001
        <RampaL@...> writes:
        >I try to convert text with czech national characters to utf-8 with
        >++enc option of write command. It seems that vim converts chars as
        >if they are in cp1252 (Latin1) instead of cp1250 (Latin2).
        >
        >My setup:
        >OS is set to Czech locale (:language returns "Czech_Czech Republic.1250")
        >encoding=cp1250
        >termencoding=cp1250
        >guifont=courier_new_CE:h9 (which is czech one)
        >:version says +multi_byte is there

        Do you have the 'iconv.dll'? Or are you using the internal Windows functions?

        FWIW, you can get the latest iconv.dll (compiled by me, version 1.7.0.1) here:

        http://www.mossbayeng.com/~ron/iconv.dll

        It's 600K.
        Ron
      • RampaL@aimtec.cz
        ... Republic.1250 ) ... functions? I use internal Windows functions (probably, now I ve searched throu disk and found C: Program Files Common
        Message 3 of 5 , Nov 13, 2001
          > <RampaL@...> writes:
          > >I try to convert text with czech national characters to utf-8 with
          > >++enc option of write command. It seems that vim converts chars as
          > >if they are in cp1252 (Latin1) instead of cp1250 (Latin2).
          > >
          > >My setup:
          > >OS is set to Czech locale (:language returns "Czech_Czech
          Republic.1250")
          > >encoding=cp1250
          > >termencoding=cp1250
          > >guifont=courier_new_CE:h9 (which is czech one)
          > >:version says +multi_byte is there
          >
          > Do you have the 'iconv.dll'? Or are you using the internal Windows
          functions?

          I use internal Windows functions (probably, now I've searched throu disk
          and
          found C:\Program Files\Common Files\GNU\iconv-1.3.dll, but it is not in
          PATH).

          >
          > FWIW, you can get the latest iconv.dll (compiled by me, version 1.7.0.1)
          here:
          >
          > http://www.mossbayeng.com/~ron/iconv.dll
          >
          I did, I put it to vim\vim60 directory. Now I can input national chars
          with encoding=utf-8 and termencoding=cp1250 (although latin small letter e
          with caron has problem - after pressing it I must press any key once more,
          then this char appears. It lies on the key with number 2 and @ sign. Other
          chars
          work perfect). This solves my problem, I can create utf-8 files now.


          ++enc behavior hasn't changed.

          If I can help somehow with diagnosing the problem with one character
          mentioned,
          don't hesitate to send a note.

          Thank you,
          Lukas Rampa
        • Francis S.Lin
          ... The official Win32 self-installer build (ftp://ftp.vim.org/pub/vim/pc/gvim60.exe) is compiled with +iconv/dyn. I think that requires an external iconv.dll,
          Message 4 of 5 , Nov 28, 2001
            * Ron Aaron <raaron@...> [011114 02:22]:
            > Do you have the 'iconv.dll'? Or are you using the internal Windows
            > functions?
            > FWIW, you can get the latest iconv.dll (compiled by me, version
            > 1.7.0.1) here:
            > http://www.mossbayeng.com/~ron/iconv.dll
            > It's 600K.
            The official Win32 self-installer build
            (ftp://ftp.vim.org/pub/vim/pc/gvim60.exe)
            is compiled with +iconv/dyn.
            I think that requires an external iconv.dll, but no any iconv.dll is
            provided inside the installer.
            Without this DLL, we cannot do any encoding conversion...

            Why isn't an iconv.dll included? Maybe we should put one or tell
            users where to find the iconv.dll in the documents (eval.txt?).

            --
            piaip, Francis.S.Lin
          • Bram Moolenaar
            ... We could include an iconv.dll with the self-installing executable. It s a bit big though (total goes from 3.4 M to 4M), and not many people will actually
            Message 5 of 5 , Dec 15, 2001
              Francis S.Lin wrote:

              > * Ron Aaron <raaron@...> [011114 02:22]:
              > > Do you have the 'iconv.dll'? Or are you using the internal Windows
              > > functions?
              > > FWIW, you can get the latest iconv.dll (compiled by me, version
              > > 1.7.0.1) here:
              > > http://www.mossbayeng.com/~ron/iconv.dll
              > > It's 600K.
              > The official Win32 self-installer build
              > (ftp://ftp.vim.org/pub/vim/pc/gvim60.exe)
              > is compiled with +iconv/dyn.
              > I think that requires an external iconv.dll, but no any iconv.dll is
              > provided inside the installer.
              > Without this DLL, we cannot do any encoding conversion...
              >
              > Why isn't an iconv.dll included? Maybe we should put one or tell
              > users where to find the iconv.dll in the documents (eval.txt?).

              We could include an iconv.dll with the self-installing executable. It's
              a bit big though (total goes from 3.4 M to 4M), and not many people will
              actually use it.

              --
              hundred-and-one symptoms of being an internet addict:
              104. When people ask about the Presidential Election you ask "Which country?"

              /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
              ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
              \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
            Your message has been successfully submitted and would be delivered to recipients shortly.