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

Non-UTF encoded strings causes coloring offset when using clang model

    XMLWordPrintable

Details

    Description

      I'm working on C89 project with files encoded in ISO-8859-2. When I'm having a string containing raw 8-bit characters, code following that string has its syntax coloring offset by the amount of 8-bit chars in that string until line end.

      After reopening the file, syntax coloring matches code as it should unill I edit anywhere in that file, then it breaks as before.

      Built-in qtc code model works ok.
      Passing „-finput-charset=iso-8859-2” to clang model in project settings has no effect

      Attachments:

      • color_offset_latin2.png → broken syntax coloring, encoding: ISO-8859-2
      • color_offset_utf8.png → after switching file encoding to UTF-8
      • color_offset_latin2_ok.png → coloring is ok after reloading the file, encoding ISO-8859-2

      Attachments

        1. color_offset_latin2_ok.png
          color_offset_latin2_ok.png
          36 kB
        2. color_offset_latin2.png
          color_offset_latin2.png
          37 kB
        3. color_offset_utf8.png
          color_offset_utf8.png
          35 kB
        4. Screenshot_20170911_131915.png
          Screenshot_20170911_131915.png
          79 kB
        5. Screenshot_20170911_133004.png
          Screenshot_20170911_133004.png
          75 kB
        6. testfun.c
          0.7 kB
        For Gerrit Dashboard: QTCREATORBUG-16941
        # Subject Branch Project Status CR V

        Activity

          People

            yvvan Ivan Donchevskii
            kkundzicz Krzysztof Kundzicz
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes