Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-22376

Paste operation inserts special characters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 4.9.0
    • Editors
    • None
    • Mac OS 10.14.4 (18E226), Apple LLVM version 10.0.1 (clang-1001.0.46.4)
    • macOS

    Description

      Sometimes the paste operation (CTRL/⌘ + V) inserts not only plain text but also some special characters.

      I noticed it today when I was copy/pasting some text (the word responseText) from a page in web-browser to Qt Creator editor (QML file). After pasting the text I got this error:

      Expected token `)'
      

      When I re-entered the same text manually, this error disappeared. So I compared the strings in HEX:

      72 65 73 70 6f 6e 73 65 e2 80 8b 54 65 78 74
      72 65 73 70 6f 6e 73 65 54 65 78 74
      

      So the difference is the e2 80 8b sequence, which apparently is what causes the error.

      So what I am reporting here is the fact the paste operation in Qt Creator inserts special (invisible) characters and that causes troubles. My expectation was that as a source code editor Qt Creator should operate only with plain text, stripping it from special formatting symbols.

      For example, here's how these two strings look like in nano editor after being pasted:

      Which, I believe, is the correct way of handling the paste operation in a source code editor.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            davschul David Schulz
            artemsyd Artem Sidyakin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes