Community
    • Login

    Differing character counts

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 845 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.
    • buggaliciousB
      buggalicious
      last edited by PeterJones

      Differing character counts: https://filehorst.de/d/ejdbehxI

      Hello

      When I paste text from Word into Notepad++ 8.4.4 64bit, I often get a different character count than when I type in Notepad++ directly.
      The linked file above (I hope the link works) shows two lines with exactly the same characters and looking like the same length, too, but the first line is counted with 117 characters and the second with 119.

      As there is no visible difference, I wonder how this can be explained.
      The file is UTF-8 and the text copied from Word was in Arial Unicode.

      Any pointers will be appreciated.

      Regards,
      Ingo

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @buggalicious
        last edited by

        @buggalicious ,

        I used moderator power to fix the link for you.

        However, I do not download files from random file hosts like that (you never know when a virus is at the other end of such a link), so I don’t know what your file might look like, so I have to guess from your description. Many other regular helpers on the forum follow the same rule.

        With a difference of two bytes, I am assuming that one file had a newline (CR LF is two bytes) at the end of the file, and the other didn’t.

        If you turn on View > Show Symbol > Show All Characters, it will show visible markings for spaces, tabs, and CR/LF: 38d1baac-6b43-4ccc-a095-1d3af1d59b09-image.png

        If this wasn’t enough for you, please do a screenshot with that View turned on (and just paste the screenshot directly to embed the image, like I did above), so that we can see if we can spot any other difference between the 117 byte and 119 byte version.

        1 Reply Last reply Reply Quote 1
        • Alan KilbornA
          Alan Kilborn
          last edited by

          Or, it could be a problem similar to this one, in regards to two things that seemingly look identical, are really not:

          https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11999

          1 Reply Last reply Reply Quote 2
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors