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

Creator sometimes can't open text file which contains Shift_JIS code correctly

    XMLWordPrintable

Details

    • Windows
    • 9ce4260d232d94a9c902333e4b894fc0514d9e6d (qt/qtbase/5.12.1)

    Description

      Condition: 

      • Japanese environment ?
      • File size over 64KiB (0x10000 bytes)
      • Two-byte characters span any boundary of 0x10000 bytes (0x0FFFF and 0x10000, 0x1FFFF and 0x20000, ...)
      • "System" on Option -> Text Editor -> Behavior -> Default Encoding 

       
      Example files are attached, OK will be open normally, but NG will be truncated Shift_JIS characters on bottom.
       
      Occasionally, it occurs when two-byte characters such as comments are straddled on the boundary.
       
      If default encode is set as Shift_JIS, it's open normally. But there is risk potentially that file will be corrupted if system is using CP932 as system.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTCREATORBUG-21622
          # Subject Branch Project Status CR V

          Activity

            People

              davschul David Schulz
              akizawa Akihito Izawa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes