This is in regards to using "Find in Files" tab.
-
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-enWilly.Wonka.the.Chocolate.Factory.1971.Blu-ray.720p.x264.YIFY.srt
https://www.opensubtitles.org/en/subtitles/5685011/willy-wonka-the-chocolate-factory-en -
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: -
@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 ofUTF-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. -
EDIT:
Sometimes I get the following error as well: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).
-
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:
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/K0MBSTTitles:
Thanks again Peter, Cheers
-
@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 ?
-