Community
    • Login

    Notepad++ v8.4.7 Release Candidate

    Scheduled Pinned Locked Moved Announcements
    13 Posts 6 Posters 2.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dinkumoilD
      dinkumoil @donho
      last edited by

      @donho

      Recently a user reported that the green change history marker also appears when changing (not converting!) the character encoding of a file. Since this doesn’t change the content of a file but only the interpretation of the content, I would consider showing the change history bar in this case as a bug too.

      Seems like there have to be done more investigations which features of Notepad++ trigger the change history bar.

      Michael VincentM donhoD dinkumoilD 3 Replies Last reply Reply Quote 3
      • Michael VincentM
        Michael Vincent @dinkumoil
        last edited by

        @dinkumoil said in Notepad++ v8.4.7 Release Candidate:

        changing (not converting!) the character encoding of a file

        Not an expert at this, but changing character encoding would change the bits/bytes on disk (maybe?) and thus trigger the Scintilla change history. I think these should ultimately be addressed with bugs / feature requests to Scintilla, but I also think Notepad++ could probably do some “work arounds” to make it behave as expected.

        I’ve already filed a bug or two with Scintilla regarding change history. Ultimately, the usefulness for me outweighs any of these hiccups and I know how to deal with them should they really annoy me, but ultimately we need to appease a much larger potentially less willing to “hack a PythonScript solution” community.

        Cheers.

        Alan KilbornA dinkumoilD 2 Replies Last reply Reply Quote 2
        • Alan KilbornA
          Alan Kilborn @Michael Vincent
          last edited by

          @dinkumoil said in Notepad++ v8.4.7 Release Candidate:

          when changing (not converting!) the character encoding

          this doesn’t change the content of a file but only the interpretation of the content

          @Michael-Vincent said in Notepad++ v8.4.7 Release Candidate:

          Not an expert at this, but changing character encoding would change the bits/bytes on disk (maybe?)

          @Michael-Vincent :

          dinkumoil means the equivalent of choosing one of the options on the Encoding menu ABOVE the separator. Although it is far from clear from the text of those menu options, these do NOT change the data in any way, just the interpretation of the data, in order for N++ to show you something (and hopefully the correct thing) visually. If nothing bits-n-bytes-wise has changed, change history shouldn’t trigger.

          1 Reply Last reply Reply Quote 6
          • dinkumoilD
            dinkumoil @Michael Vincent
            last edited by dinkumoil

            @Michael-Vincent said in Notepad++ v8.4.7 Release Candidate:

            changing character encoding would change the bits/bytes on disk

            No, it doesn’t. There is a difference between changing and converting character encoding.

            Changing character encoding only causes a reinterpretation of a file’s content, i.e. what is shown in Npp’s editing window is different from that what has been shown before encoding change but the bytes in RAM are not touched. When the file is saved, the bytes on disk are the same as before.

            When converting the character encoding, even the bytes in RAM representing the file’s content are changed - code points from the source encoding are mapped to code points of the target encoding and after that the file’s content is reinterpreted using the target encoding. So, the glyphs you see on screen may be the same like before encoding conversion (it depends on having equivalent glyphs in source and target encoding scheme). But when the file is saved, the bytes on disk are (obviously) not the same anymore.

            The difference between changing and converting character encoding is the reason why we have different menu entries for them:

            aed9d708-967d-4a8f-84bb-ab360756e9c7-grafik.png

            The menu entries in the red box convert (as their names suggest) the encoding of a file whereas all the menu entries in the green boxes only change the encoding, i.e. they trigger Npp to only reinterpret a file’s content.

            @Alan-Kilborn

            You explained it in a much more shorter way!

            1 Reply Last reply Reply Quote 7
            • PeterJonesP PeterJones referenced this topic on
            • PeterJonesP
              PeterJones @donho
              last edited by PeterJones

              @donho said in Notepad++ v8.4.7 Release Candidate:

              1. Fix language detected from content not applied if default language is set

              I have confirmed that this is working for me: the default language isn’t overriding a detected language, and shebang/prolog/first-line detection isn’t overriding known extensions.

              Thanks for all the work that @rdipardo and @ArkadiuszMichalski put into hashing out the exact priorities required and making it work, and for putting up with my inputs even when I misunderstood and otherwise confused things.

              1 Reply Last reply Reply Quote 4
              • PeterJonesP
                PeterJones @donho
                last edited by

                @donho said in Notepad++ v8.4.7 Release Candidate:

                1. Fix printing with extra background colors issue due to Change History.

                I confirmed that it no longer includes the Change History margin colors as background colors when printing. Thanks for fixing that! :-)

                1 Reply Last reply Reply Quote 4
                • conky77C conky77 referenced this topic on
                • donhoD
                  donho @dinkumoil
                  last edited by

                  @dinkumoil said in Notepad++ v8.4.7 Release Candidate:

                  Recently a user reported that the green change history marker also appears when changing (not converting!) the character encoding of a file. Since this doesn’t change the content of a file but only the interpretation of the content, I would consider showing the change history bar in this case as a bug too.

                  Is there any issue opened in GitHub? If no, could you open one - I’ll also see what I can do about it.

                  rdipardoR 1 Reply Last reply Reply Quote 2
                  • PeterJonesP PeterJones referenced this topic on
                  • rdipardoR
                    rdipardo @donho
                    last edited by

                    @donho,

                    Is there any issue opened in GitHub?

                    Cf. Reloading a file will mark all lines as changed in change history bar

                    Does changing the encoding cause buffer reload? If yes, it’s probably the same issue as the reported one.

                    The reload issue is already being addressed upstream:

                    An issue that has appeared with change markers is that SciTE’s Revert command leads to the whole document getting a green change mark as revert just reloads each byte of the file. Since its useful to undo to before the revert, this point can’t just be set as the start of change history to appear clear.
                    [ . . . ]
                    This is implemented in SciTE and only works for moderate length (1MB) files in 8-bit encodings as it reads the whole file into a temporary buffer and then checks and modifies. A streaming version could be written that would handle larger files. Scintilla could also add an ‘Update’ API that could minimize change markers.

                    https://groups.google.com/g/scite-interest/c/I2wN_BiPfGM/m/70AoM0loAQAJ
                    (emphasis added)

                    1 Reply Last reply Reply Quote 2
                    • dinkumoilD
                      dinkumoil @dinkumoil
                      last edited by dinkumoil

                      @dinkumoil said in Notepad++ v8.4.7 Release Candidate:

                      Recently a user reported that the green change history marker also appears when changing the character encoding of a file.

                      @donho said in Notepad++ v8.4.7 Release Candidate:

                      Is there any issue opened in GitHub?

                      @donho

                      It is not necessary to open an issue. Using SysInternals’ ProcMon I was able to figure out that Notepad++ reopens a file when its character encoding is changed. So, the issue I was talking about should be resolved automatically when already existing issue Reloading a file will mark all lines as changed in change history bar gets resolved.

                      donhoD 1 Reply Last reply Reply Quote 1
                      • donhoD
                        donho @dinkumoil
                        last edited by

                        @dinkumoil said in Notepad++ v8.4.7 Release Candidate:

                        It is not necessary to open an issue. Using SysInternals’ ProcMon I was able to figure out that Notepad++ reopens a file when its character encoding is changed. So, the issue I was talking about should be resolved automatically when already existing issue Reloading a file will mark all lines as changed in change history bar gets resolved.

                        I can reproduce it. The issue is kind of reminder (assigned to me) to put me on the track when I’ve time to work on it.

                        1 Reply Last reply Reply Quote 1
                        • PeterJonesP PeterJones referenced this topic on
                        • donhoD donho unpinned this topic on
                        • donhoD donho locked this topic on
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors