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

Re: vim: display â<80><99>

Expand Messages
  • Dominique Pellé
    ... Additional information: I just found that pasting by selecting text in Firefox and dragging the selection into Vim (terminal) works, whereas pasting with
    Message 1 of 7 , Feb 10, 2013
      Dominique Pellé wrote:

      > Tony Mechelynck <antoine.mechelynck@...> wrote:
      >> On 10/02/13 19:11, Dominique Pellé wrote:
      >>> ping <songpingemail@...> wrote:
      >>>> I've copied and pasted an article from web page and it looks I got a lot
      >>>> of
      >>>> following:
      >>>> â<80><99>
      >>>> so essentially it should be just a ' character, for example:
      >>>> If youâ<80><99>ve
      >>>> is there a way to get them displayed/processed well?
      >>>> thanks!
      >>>> regards
      >>>> ping
      >>> I have the same problem. When I copy paste text
      >>> from Firefox into Vim running in a terminal (xfce or
      >>> xterm at least), I get garbage for diacritics. If I do
      >>> the same in GVim (gtk2), it works fine.
      >>> Yet my settings in GVim and Vim (terminal) are
      >>> identical:
      >>> :set encoding?
      >>> encoding=utf-8
      >>> :set fileencoding?
      >>> fileencoding=
      >>> :set fileencodings=?
      >>> fileencodings=ucs-bom,utf-8,latin1
      >>> I'm not 100% sure, but I think it used to work fine
      >>> a long time ago.
      >>> Example to reproduce:
      >>> 1) go to http://fr.wikipedia.org/wiki/Vim in Firefox
      >>> 2) select with the mouse the first sentence in
      >>> Firefox which says:
      >>> "Vim est un éditeur de texte, c’est-à-dire un
      >>> logiciel permettant la manipulation de fichiers texte."
      >>> 3) Paste in Vim (terminal) using the mouse (middle
      >>> click on Linux)
      >>> 4) observe that it pastes:
      >>> Vim est un <e9>diteur de texte, c\u2019est-<e0>-dire un logiciel
      >>> permettant la manipulation de fichiers texte.
      >>> 5) Do the same with gvim (gtk2) and observe that
      >>> there is no bug in Gvim
      >>> I also tried with the Chromium browser (same result).
      >>> The problem has to do with copy paste which loses
      >>> the character encoding I think and somehow makes
      >>> assumes the wrong encoding when pasting.
      >>> Typing Unicode characters works fine in terminal.
      >>> Copy paste from gvim into Vim (terminal) works fine.
      >>> I'm using vim-7.3.806 on xubuntu-12.10, Linux x86_64.
      >>> Dominique
      >> With me it pastes correctly at step 2; however my system locale in bash (and
      >> therefore in the terminal) is en_US.UTF-8 (most specifically, LC_CTYPE is
      >> unset but LANG is set to that value), so the konsole terminal and Vim both
      > I use this locale:
      > $ locale
      > LANG=eo.UTF-8
      > LANGUAGE=eo:en_US:en
      > LC_CTYPE="eo.UTF-8"
      > LC_NUMERIC=en_US.UTF-8
      > LC_TIME=en_US.UTF-8
      > LC_COLLATE="eo.UTF-8"
      > LC_MONETARY=en_US.UTF-8
      > LC_MESSAGES="eo.UTF-8"
      > LC_PAPER=en_US.UTF-8
      > LC_NAME=en_US.UTF-8
      > LC_ADDRESS=en_US.UTF-8
      > LC_TELEPHONE=en_US.UTF-8
      > LC_ALL=
      > But if I do "export LANGUAGE=en_US.UTF-8"
      > before starting Vim, then it works!
      > So something is broken with the eo.UTF-8 locale
      > somehow (using xubuntu-12.10).
      > But what is strange is that the bug only affects Vim.
      > Trying to paste diacritics in the shell works. It also
      > works fine with other text editors in the terminal. I tried
      > nano and emacs in terminal where it pasting worked
      > without problem even when using the eo.UTF-8 locale.

      Additional information: I just found that pasting by selecting
      text in Firefox and dragging the selection into Vim (terminal)
      works, whereas pasting with middle click does not work
      (garbage for diacritics when using eo.UTF-8 locale i.e.
      esperanto locale). At least I have now a workaround
      without having to change my locale to en_US.UTF-8.


      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    Your message has been successfully submitted and would be delivered to recipients shortly.