Community
    • Login

    This is in regards to using "Find in Files" tab.

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    7 Posts 2 Posters 84 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.
    • Hank KH
      Hank K
      last edited by

      Having an issue that I’ve seen more than once an decided to find out the reason why.

      This is in regards to using “Find in Files” tab.

      Find what: ♪|♪

      In only finds them in the “ENG-M.srt”, but not in the “YIFY.srt” file. (see URL below)

      But if I use the ANSI code it finds in both.

      Find what: ♪|♪

      Baffled?

      Willy Wonka . The Chocolate Factory (1971) 720p Blu-ray x264 ENG-M.srt
      https://www.opensubtitles.org/en/subtitles/4702327/willy-wonka-the-chocolate-factory-en

      Willy.Wonka.the.Chocolate.Factory.1971.Blu-ray.720p.x264.YIFY.srt
      https://www.opensubtitles.org/en/subtitles/5685011/willy-wonka-the-chocolate-factory-en

      Hank KH PeterJonesP 2 Replies Last reply Reply Quote 0
      • Hank KH
        Hank K @Hank K
        last edited by Hank K

        @Hank-K

        Forgot to mention, I use other regex for checking and fixing the COUNT(s) when editing the file that has the best search results, ie

        ^(-\h)?♪\h   or   h♪$
        
        From this:
        ♪ Who can take a sunrise ♪
        - ♪ The Candy Man ♪
        
        To this:
        <font color="#FF9966"><i>♫  Who can take a sunrise  ♫</i></font>
        - <font color="#FF9966"><i>♫  The Candy Man  ♫</i></font>
        

        EDIT:
        Sometimes I get the following error as well:

        6e73c4f9-6874-4f07-960e-0dad43d30a05-image.png

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

          @Hank-K said in This is in regards to using "Find in Files" tab.:

          Find what: ♪|♪

          In only finds them in the “ENG-M.srt”, but not in the “YIFY.srt” file. (see URL below)

          I cannot replicate.

          I grabbed both those files (wow, what an annoying site; I am not going to alllow a random site notifications just to be able to download a file to help you; luckily for you, it let me do the “beta download” with a 20sec delay instead of requiring notifications; I don’t allow any website to push me notifications in the browser like that, let alone one I’m likely to never use again). Both files open in Notepad++ as UTF-8 for me (I have auto-detect encoding off, and have my defaults set up to use UTF-8 for ANSI files as well).

          If I use normal search mode, ♪|♪ finds nothing, because there aren’t any “eighth note, vertical bar, eighth note” sequences in the file. If I use regular expression mode, where that’s a pointless “match the eighth note or match the eighth note” (ie, equivalent to ♪ “match the eighth note”), it matches 515 in the ENG-M, or 446 in the YIFY version.

          So my best guess is that on your system, the YIFY file isn’t auto-detecting as UTF-8, so then it reads the three bytes as three separate characters rather than the single UTF-8 character that those bytes represent. If, when you load the YIFY, it shows ANSI in the status bar, instead of UTF-8, you can use Encoding > UTF-8 (not Encoding > Convert to UTF-8), which will tell Notepad++ to re-interpret all the bytes of the file as UTF-8 instead of as ANSI. After you do that, the search should work as you desire.

          Baffled?

          The only thing I’m baffled about is why you would use ♪|♪ regular expression instead of the simpler ♪ in either normal or regular expression mode (unless what we can see in your post is different than you intended, and there were actually characters like “space note OR note space” or some such.

          1 Reply Last reply Reply Quote 1
          • PeterJonesP
            PeterJones @Hank K
            last edited by PeterJones

            @Hank-K,

            EDIT:
            Sometimes I get the following error as well:

            6e73c4f9-6874-4f07-960e-0dad43d30a05-image.png

            That really makes me think that Notepad++ thinks the file you are editing is ANSI, not UTF-8. Since the ANSI character set cannot represent the ♪ character, then internal conversions use ? instead – and so entering ♪|♪ in the search for an ANSI file becomes ?|? when Notepad++ actually searches, which is invalid regular expression, because ? is a modifier, not a literal. (I confirmed, if I create an ANSI file, whether or not it has that character, and try to do the search you showed, Notepad++ tells me that ?|? is illegal, like your error message.)

            Make Notepad++ knows to read the file as UTF-8 using the Encoding menu I described in my first reply , because your subtitle files obvious are (based on the existence of the ♪ character in the file).

            Hank KH 1 Reply Last reply Reply Quote 2
            • Hank KH
              Hank K @PeterJones
              last edited by

              @PeterJones

              Ok, first thank so much for the detailed expanations. Second sorry for the sub site it had become a nightmare ever since subscene.com went belly-up. I actually got fedup with what you saw, being member helps a little. But i dl a lot so actully had to become a paid vip member. To top it off they won’t let me post my SINGLE LINE subs.

              @PeterJones said in This is in regards to using "Find in Files" tab.:

              (I have auto-detect encoding off, and have my defaults set up to use UTF-8 for ANSI files as well).

              I pretty much use default setting, dark mode, added Proper Case to popup context and removed a few toolbar icons. I actually had to seach the to find the settings you mentioned. My auto-detect encoding checkbox was checked, I un-checked. As for “New Document” setting:

              34486c8b-dbaf-4272-aa8b-62d830c8f36f-image.png

              For now I’m going to use a single quarter-note on Find in Files in Normal mode.

              While we are no settings issue, is there a way to turn off the CHIME ?

              Image examples of my work:

              https://ibb.co/album/M8ykdx
              https://ibb.co/album/tLzTb8
              https://ibb.co/album/V2KPpc
              https://ibb.co/album/bsyv0d
              https://ibb.co/album/ZL7rGh
              https://ibb.co/album/D5JQKF
              https://ibb.co/album/K0MBST

              Titles:

              https://ibb.co/album/gdMRSL

              Thanks again Peter, Cheers

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

                @Hank-K said in This is in regards to using "Find in Files" tab.:

                While we are [on] settings issue, is there a way to turn off the CHIME ?

                Settings > Preferences > MISC > ☐ Mute all sounds

                Hank KH 1 Reply Last reply Reply Quote 2
                • Hank KH
                  Hank K @PeterJones
                  last edited by

                  @PeterJones

                  An it was right above auto-detect encoding … lol

                  Thx again

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