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

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

Expand Messages
  • Dominique Pellé
    ... 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
    Message 1 of 7 , Feb 10, 2013
    • 0 Attachment
      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

      --
      --
      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.
    • Tony Mechelynck
      ... 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
      Message 2 of 7 , Feb 10, 2013
      • 0 Attachment
        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 know that strings are pasted in UTF-8. I also make
        sure that 'encoding' is UTF-8 in my vimrc, more or less as described in
        http://vim.wikia.com/wiki/Working_with_Unicode

        Specifically, the line pasted in Console Vim is as follows:
        Vim est un éditeur de texte, c’est-à-dire un logiciel permettant la
        manipulation de fichiers texte.

        I'm using vim 7.3.806 (own-compiled from Bram's sources), Huge build
        running either in GUI or Console mode (for this test, as "vim" in a
        console terminal), running on openSUSE 12.1 x86_64. The Vim build is
        also 64-bit, as can be seen from the link log, where I get warning
        messages starting with "skipping incompatible" for 32-bit libraries in
        /usr/lib/


        Best regards,
        Tony.
        --
        Justice, n.:
        A decision in your favor.

        --
        --
        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.
      • Dominique Pellé
        ... 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
        Message 3 of 7 , Feb 10, 2013
        • 0 Attachment
          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_MEASUREMENT=en_US.UTF-8
          LC_IDENTIFICATION=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.

          Regards
          Dominique

          --
          --
          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.
        • 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 4 of 7 , Feb 10, 2013
          • 0 Attachment
            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_MEASUREMENT=en_US.UTF-8
            > LC_IDENTIFICATION=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.

            Regards
            Dominique

            --
            --
            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.