Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-50826

When reconversion, Qt components can not handle emoji.

    XMLWordPrintable

Details

    Description

      This issue has been solved
      fcitx changed to use QChar length.
      =========================================================================================
      Qt ime for linux uses UTF16 length.
      And Qt component probably expects QChar length.
      Consequently, when reconversion, Qt ime on linux could break characters with emoji introduced.
      Qt components(kate, etc) can not handle emoji when reconversion.
      I think Qt components do not expect UTF16 length for reconversion.

      This problem is entangled with Qt ime for windows.
      QTextEdit on windows work well for QChar length but UTF16 length.

      • They should use character length from document:

      ===========================================================================================
      int QInputMethodEvent::replacementLength() const

      Returns the number of """characters""" to be replaced in the preedit string.

      See also replacementStart() and setCommitString().
      int QInputMethodEvent::replacementStart() const

      Returns the position at which """characters"""" are to be replaced relative from the start of the preedit string.

      See also replacementLength() and setCommitString().
      void QInputMethodEvent::setCommitString(const QString & commitString, int replaceFrom = 0, int replaceLength = 0)
      ============================================================================================

      It is very confusing.
      """character""" should be replaced with "QChar", which is never character.
      ============================================================================================
      int QString::size() const
      Returns the number of """characters""" in this string.
      ============================================================================================

      NOW, which is right for Qt reconversion? UTF16 or QChar.
      Which does Qt ime use?

      DEMO Reconversion with Emoji on kate for lubuntu 15.10
      kate expects UTF16 length from ime when reconversion.

      https://youtu.be/qKVQLHx7kfc

      DEMO Reconversion with Emoji on ScintillaQt for lubuntu 15.10
      Make ScintillaQt expect character length from ime when reconversion.

      https://youtu.be/fxm15rcth1Q

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            johnsonj johnsonj
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes