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

Re: Windows gVim cannot read Chinese from clipboard created in Cygwin vim

Expand Messages
  • Sean
    我把我的帖子翻译成英文,并上交国际组织: http://groups.google.com/group/vim_use/browse_thread/thread/c01224df490d7495
    Message 1 of 6 , Jan 30, 2010
      我把我的帖子翻译成英文,并上交国际组织:
      http://groups.google.com/group/vim_use/browse_thread/thread/c01224df490d7495

      让我们看看国际民间艺人的武林功夫如何。

      --
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • bill lam
      ... Window system clipboard use utf16 encoding. Did you test these two program putclip and clip if they accept utf8? Or Did it work if pasting to
      Message 2 of 6 , Jan 30, 2010
        sab, 30 Jan 2010, Sean skribis:
        > Option #1, using cygwin putclip:
        > ------------------------------
        > :%y|call system('putclip', @@)
        > ------------------------------
        >
        > option #2, using clip from Windows
        > ---------------------------
        > :%y|call system('clip', @@)
        > ---------------------------

        Window system clipboard use utf16 encoding. Did you test these two
        program 'putclip' and 'clip' if they accept utf8? Or Did it work if
        pasting to notepad?

        --
        regards,
        ====================================================
        GPG key 1024D/4434BAB3 2008-08-24
        gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

        --
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • Sean
        ... No. Pasting to notepad is even worse, as it all ended up with one long line with the same garbled multi-bytes. -- You received this message from the
        Message 3 of 6 , Jan 30, 2010
          >> Or Did it work if pasting to notepad?

          No. Pasting to notepad is even worse, as it all ended up with one
          long line with the same garbled multi-bytes.

          --
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
        • bill lam
          ... I suggest you to make sure those clip program support unicode first and translate encoding if necessary before feeding them data. -- regards,
          Message 4 of 6 , Jan 30, 2010
            sab, 30 Jan 2010, Sean skribis:
            > >> Or Did it work if pasting to notepad?
            >
            > No. Pasting to notepad is even worse, as it all ended up with one
            > long line with the same garbled multi-bytes.

            I suggest you to make sure those clip program support unicode first
            and translate encoding if necessary before feeding them data.

            --
            regards,
            ====================================================
            GPG key 1024D/4434BAB3 2008-08-24
            gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

            --
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
          • Sean
            Further investigation shows (1) from console vim, we can send kind of binary version of content ... (But we suffer a flash DOS box on the status line.) (3)
            Message 5 of 6 , Jan 31, 2010
              Further investigation shows

              (1) from console vim, we can send kind of "binary" version of content
              to clipboard by:
              :%y|call system('/bin/putclip', @@)

              (2) from gVim, we can "correct" the clipboard contents by:
              :let @+=system('/bin/getclip')
              (But we suffer a flash DOS box on the status line.)

              (3) However, to "communicate" between console vim and gVim on the same
              Windows box, it is easy to do write/read a temp file. CJK is never
              garbled through "write/read" text file.

              (4) It seems not possible to send readable CJK to Windows Clipboard
              from console vim.

              (5) Searching "clipboard" on this group showed many relating
              discussions. One interesting one is the #13 "Console cygwin Vim
              using win32 clipboard" on http://groups.google.com/group/vim_dev/web/vim-patches
              It looks like that patch can make @+ register available for console
              vim. If that is the case, the patch should be included to the official
              distribution.


              Thanks

              Sean

              --
              You received this message from the "vim_use" maillist.
              For more information, visit http://www.vim.org/maillist.php
            Your message has been successfully submitted and would be delivered to recipients shortly.