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

        1. SystemDecodeNG_0x10000.txt
          64 kB
          Akihito Izawa
        2. SystemDecodeNG_0x20000.txt
          128 kB
          Akihito Izawa
        3. SystemDecodeOK_0x10000.txt
          64 kB
          Akihito Izawa
        4. SystemDecodeOK_0x20000.txt
          128 kB
          Akihito Izawa

        Issue Links

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

          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