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

Re: Copy and paste Spanish from google translate into vim?

Expand Messages
  • Christian Brabandt
    Hi Dominique! ... Interesting. I don t see this behaviour here. regards, Christian -- Mancher lehnt eine gute Idee bloß deshalb ab, weil sie nicht von ihm
    Message 1 of 10 , May 9, 2013
    • 0 Attachment
      Hi Dominique!

      On Do, 09 Mai 2013, Dominique Pellé wrote:

      > Copy/paste from Firefox into Vim does not work for me either for
      > non ASCII characters if I use the middle click to paste in Vim (terminal)
      > on Linux. It copies text, but messes up accents. I think that Vim puts
      > a latin1 string and then interprets it as utf-8 so it looks messed up.
      > Taking your example, if I copy/paste "síntoma" from Firefox with the
      > mouse, I see in Vim (terminal) "s<ed>ntoma" . <ed> being in Latin1:
      >
      > 355 237 ED í LATIN SMALL LETTER I WITH ACUTE
      >
      > However, it works if I select the text in Firefox and drag it into the
      > terminal. Copy/paste also work with middle click in gvim.
      >
      > I just realized now that copy paste actually works when I use
      > "vim -u NONE". So by trial and error, I searched for the minimalistic
      > .vimrc that can reproduce the problem. I can reproduce the
      > copy/paste bug as follows:
      >
      > 1/ create a minimalistic ~/.vimrc file:
      >
      > $ cat ~/.vimrc
      > set enc=utf8
      > language eo.UTF-8
      > set mouse=a
      >
      > 2/ Start vim with:
      >
      > $ vim --noplugin
      >
      > 3/ Copy a word with accents in Firefox such as "síntoma"
      > and paste it in Vim (terminal) with middle click.
      >
      > 4/ Observe the bug Vim pastes: s<ed>ntoma
      > Expected behavior was to paste "síntoma"
      > Note also that dragging the selection from Firefox
      > to Vim pastes correctly.
      >
      > Interestingly, bug happens with the "eo.UTF8" language
      > but not with the "fr_FR.UTF8" language for example.
      >
      > You may need to install the eo.UTF8 locale in order to reproduce
      > the bug with "sudo locale-gen eo.UTF8" as described here
      > for Ubuntu:
      >
      > http://markushedlund.com/dev-tech/install-a-locale-on-ubuntu-11-10

      Interesting. I don't see this behaviour here.

      regards,
      Christian
      --
      Mancher lehnt eine gute Idee bloß deshalb ab, weil sie nicht von ihm
      ist.
      -- Luis Bunuel

      --
      --
      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é
      ... OK. Do you have the eo.UTF8 locale? I can reproduce it on 2 different Linux x86_64 machines (xubuntu-12.04 and xubuntu-12.10). It might be a problem
      Message 2 of 10 , May 9, 2013
      • 0 Attachment
        Christian Brabandt <cblists@...> wrote:

        > Hi Dominique!
        >
        > On Do, 09 Mai 2013, Dominique Pellé wrote:

        ...snip...
        >> I just realized now that copy paste actually works when I use
        >> "vim -u NONE". So by trial and error, I searched for the minimalistic
        >> .vimrc that can reproduce the problem. I can reproduce the
        >> copy/paste bug as follows:
        >>
        >> 1/ create a minimalistic ~/.vimrc file:
        >>
        >> $ cat ~/.vimrc
        >> set enc=utf8
        >> language eo.UTF-8
        >> set mouse=a
        >>
        >> 2/ Start vim with:
        >>
        >> $ vim --noplugin
        >>
        >> 3/ Copy a word with accents in Firefox such as "síntoma"
        >> and paste it in Vim (terminal) with middle click.
        >>
        >> 4/ Observe the bug Vim pastes: s<ed>ntoma
        >> Expected behavior was to paste "síntoma"
        >> Note also that dragging the selection from Firefox
        >> to Vim pastes correctly.
        >>
        >> Interestingly, bug happens with the "eo.UTF8" language
        >> but not with the "fr_FR.UTF8" language for example.
        >>
        >> You may need to install the eo.UTF8 locale in order to reproduce
        >> the bug with "sudo locale-gen eo.UTF8" as described here
        >> for Ubuntu:
        >>
        >> http://markushedlund.com/dev-tech/install-a-locale-on-ubuntu-11-10
        >
        > Interesting. I don't see this behaviour here.
        >
        > regards,
        > Christian

        OK. Do you have the eo.UTF8 locale? I can reproduce it on 2 different
        Linux x86_64 machines (xubuntu-12.04 and xubuntu-12.10). It might be
        a problem with the eo.UTF8 locale rather than Vim.

        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.
      • glts
        ... I m not sure whether this is relevant, but the ISO language code for Spanish is es , not eo . eo is the language code for Esperanto, which is supported
        Message 3 of 10 , May 9, 2013
        • 0 Attachment
          On Thursday, May 9, 2013 2:10:23 PM UTC+2, Dominique Pelle wrote:
          > OK. Do you have the eo.UTF8 locale? I can reproduce it on 2
          > different Linux x86_64 machines (xubuntu-12.04 and xubuntu-12.10). It
          > might be a problem with the eo.UTF8 locale rather than Vim.

          I'm not sure whether this is relevant, but the ISO language code for
          Spanish is "es", not "eo".

          "eo" is the language code for Esperanto, which is supported by far fewer
          systems. Maybe what you've discovered is a flaw in the Esperanto locale.

          --
          --
          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.
        • Christian Brabandt
          Hi Dominique! ... I generated it using the locale-gen command. This is ubuntu 12.10 regards, Christian -- Was man besonders gerne tut, ist selten ganz
          Message 4 of 10 , May 11, 2013
          • 0 Attachment
            Hi Dominique!

            On Do, 09 Mai 2013, Dominique Pellé wrote:

            > Christian Brabandt <cblists@...> wrote:
            >
            > > Hi Dominique!
            > >
            > > On Do, 09 Mai 2013, Dominique Pellé wrote:
            >
            > ...snip...
            > >> I just realized now that copy paste actually works when I use
            > >> "vim -u NONE". So by trial and error, I searched for the minimalistic
            > >> .vimrc that can reproduce the problem. I can reproduce the
            > >> copy/paste bug as follows:
            > >>
            > >> 1/ create a minimalistic ~/.vimrc file:
            > >>
            > >> $ cat ~/.vimrc
            > >> set enc=utf8
            > >> language eo.UTF-8
            > >> set mouse=a
            > >>
            > >> 2/ Start vim with:
            > >>
            > >> $ vim --noplugin
            > >>
            > >> 3/ Copy a word with accents in Firefox such as "síntoma"
            > >> and paste it in Vim (terminal) with middle click.
            > >>
            > >> 4/ Observe the bug Vim pastes: s<ed>ntoma
            > >> Expected behavior was to paste "síntoma"
            > >> Note also that dragging the selection from Firefox
            > >> to Vim pastes correctly.
            > >>
            > >> Interestingly, bug happens with the "eo.UTF8" language
            > >> but not with the "fr_FR.UTF8" language for example.
            > >>
            > >> You may need to install the eo.UTF8 locale in order to reproduce
            > >> the bug with "sudo locale-gen eo.UTF8" as described here
            > >> for Ubuntu:
            > >>
            > >> http://markushedlund.com/dev-tech/install-a-locale-on-ubuntu-11-10
            > >
            > > Interesting. I don't see this behaviour here.
            > >
            > > regards,
            > > Christian
            >
            > OK. Do you have the eo.UTF8 locale? I can reproduce it on 2 different
            > Linux x86_64 machines (xubuntu-12.04 and xubuntu-12.10). It might be
            > a problem with the eo.UTF8 locale rather than Vim.

            I generated it using the locale-gen command. This is ubuntu 12.10

            regards,
            Christian
            --
            Was man besonders gerne tut, ist selten ganz besonders gut.

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