Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics

    • All categories
    • CoisesC

      Search++: A work in progress

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      115
      5 Votes
      115 Posts
      34k Views
      CoisesC
      @guy038 said: FYI, during all my tests, the Autodetect character encoding option, in Settings > Preferences… > MISC, was checked and all the files, described in the P.S. section of my previous post, contain a Byte Order Mark ( BOM ). Autodetect is irrelevant when a byte order mark is present: Notepad++ always honors byte order marks. The only time autodetect matters is for a file with no byte order mark that doesn’t appear to be UTF-8 and doesn’t have an internal indication (like an HTML file with a <meta charset> declaration) of its encoding. With autodetect off, such files will always be read using the system default code page. With autodetect on, Notepad++ runs some heuristic tests to try to guess whether the file uses a different legacy encoding. When plugins access documents open in Notepad++ they necessarily use the copies Notepad++ has already loaded, so they “inherit” Notepad++’s encoding detection. The loaded copy will always be either in the system default code page (“ANSI”) or UTF-8. Notepad++ converts any document that isn’t one of those. (Any indication in the status bar other than ANSI or UTF-8 means Notepad++ has converted the document to UTF-8, and will convert it back to the indicated encoding when saving it.) If a plugin accesses files on disk without opening them in Notepad++ — as Search++ does for Search in Files, and as it appears MultiReplace does when searching in files — it’s up to the plugin to sort out the encoding. I’m not familiar with the code for @thomas-knoefel’s MultiReplace, but based on your tests, I suspect it doesn’t process UTF-16 correctly when searching in files. You could probably construct a minimized example and submit an issue if you were so inclined. Now, based on my test, have you conducted any similar tests of your own, and have you found that searching with Search++ also takes longer compared to the native search in N++ ? Comparisons looked fine at first. I was running regular expressions with a lot of backtracking against thousands of files on an SSD. Then things fell apart when I tried a network share. Most of my testing has been “stress testing” rather than comparisons, but they point to the same problem. I understand the problem. Engineering a solution is taking some time. Your tests, with the inclusion of re-running the searches, demonstrate what is happening quite well. In the rerun tests, the files from your thumb drive were already cached by Windows. Those second tests show (roughly) how much time the actual searching took. (Notice that Search++ was faster there, because it uses multiple cores of your computer to search several files simultaneously instead of processing them one at a time.) The difference between the first and second runs is (roughly) the time it took to read the files from the thumb drive. That is where the current version of Search++ is just plain doing it wrong. I naïvely supposed that Windows was smart enough to “serialize” access to a device, like a USB drive, from different threads in a manner sensible for the device. Alas, it doesn’t work that way. However many threads your computer can run simultaneously, they’re all hitting the USB drive with requests for different files at the same time. Not only is that not any faster than single-threading them, it’s actually slower, because the controller in the drive is dealing with “too many” requests coming in all at once. The multi-threading I have works pretty well for an internal SSD. It also works if Windows has already cached the entire folder in memory. For everything else… it sucks. I’m working on solving that problem now. It’s slow going. There are a lot things you can “get by with” when single-threading that just blow up under one condition or another when multi-threading.
    • Claudia SvensonC

      How to auto-convert text (Umlaute) when changing file encoding from ANSI to UTF-8 BOM?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      15
      0 Votes
      15 Posts
      5k Views
      mpheathM
      The Python script I posted is expected to handle single byte errors from UTF8 decoding. Asian languages can be 2 byte for ANSI and so the script may need to get the following byte too to decode both bytes properly. Probably will not find recovery tools and the like that will fix mixed encoding errors as the solution in some cases might be worse then the problem though in this case tested OK. Once saved, then there might be no going back and so creating a backup before the operation would be wise. Inspect the results to confirm is OK.
    • dr ramaanandD

      With the help of a Regex, how to find "code" preceded by a "<" only if "code {" is absent between "<style" and "</style>" in the css section which is below ?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      13
      0 Votes
      13 Posts
      3k Views
      dr ramaanandD
      @guy038 Merci beaucoup!
    • P

      Need help with find and replace using wildcards and in multiple files

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      11
      1 Votes
      11 Posts
      4k Views
      P
      @PeterJones Worked perfectly, thank you.
    • Claudia SvensonC

      Bug: Empty file with UTF-8 encoding saved as ANSI

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      8
      1 Votes
      8 Posts
      2k Views
      MarkusBodenseeM
      @Coises said: What is really means is, when Notepad++ opens an existing file that contains only ASCII characters, it should treat it as UTF-8 rather than as ANSI. Yeah, so for example: “Treat ASCII-only files as UTF-8 (instead of ANSI)” or something similar could be a more clear wording for the option. Which, for me, raises the question: Why is this only available when UTF-8 is the default encoding for new files? It would add a bit more flexibility to the user, but on the other side it seems very unlikely to set this option if you don’t want UTF-8 as default. So I guess it could be a preventative measure that the user doesn’t set any confusing options.
    • guy038G

      Are both '.7z' and '.zip' portable archives necessary ?

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      8
      0 Votes
      8 Posts
      2k Views
      sevem47S
      @ThosRTanner said: This doesn’t seem terribly useful for an installation package though. This is exactly my use case: I download the zip archive end selectively extract only changed files. Some of the files in my installation I explicitly do NOT want to get overwritten. In the end it is really just a matter of taste. And I really appreciate the possibility to choose my desired format. From this I support the current situation, that both format are presented for download.
    • DougK.AZD

      Ctrl-J (join lines) replaces LF with space

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      8
      0 Votes
      8 Posts
      3k Views
      guy038G
      Hi, @dougk.az, @peterjones and All, Oh, yes, Peter, you’re perfectly right ! But I must be a little tired from this heat wave. Since June 22, in the room where my desk is, even with a fan, the temperature has usually been between 29 °C and 30.5 °C. It’s awful ! BR guy038 Oh ! Now, I also realized that @dougk.az never spoke about the form feed ( FF ) characters, of code \x0C but spoke about the line feed ( LF ) chars, of code \x0A As I said above : really tired by heat !!!
    • rafaelloR

      Awesome Notepad++ Configs, settings and syntax highlighting

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      7
      3
      0 Votes
      7 Posts
      2k Views
      PeterJonesP
      @rafaello , IANAL, and I don’t own the trademark, but with your clarifications and updates, I believe you’re probably not violating the trademark (IMO). It’s good to see someone who is willing to accept such feedback (rather than digging in your heels for a while, like happened with the aforementioned fork).
    • Troglo37T

      Is There A Way To Ignore Letters With Accents When Searching?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      6
      0 Votes
      6 Posts
      127 Views
      dr ramaanandD
      He has to hit Ctrl+F on the keyboard or use the drop-down from the toolbar to open that dialogue
    • donhoD

      Notepad++ release 8.9.7

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      6
      2 Votes
      6 Posts
      4k Views
      PeterJonesP
      @donho, Based on HELP on Macros - security issue? and Problem running a macro without any associated key combination, I would say that the Security Warning dialog needs to be slightly more explicit: now that the warning occurrs for both Run menu entries and for Macro menu entries, the message should change use “Validate shortcuts.xml” from the menu to confirm it to use “Validate shortcuts.xml” from the Run menu to confirm it, so that users can find that menu entry, whether they see the message from trying to do a saved Run command or a Macro.
    • J

      Issues with XML highlighting text

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      6
      1
      1 Votes
      6 Posts
      225 Views
      J
      @PeterJones I was looking at style for CDATA instead of SGML, so that explains it. Thanks a lot for the help!!
    • guy038G

      An incredible 4-6 loss !

      Watching Ignoring Scheduled Pinned Locked Moved Blogs
      5
      0 Votes
      5 Posts
      213 Views
      David Brigden52D
      Seems they decided that it they couldn’t be the heroes, rhat they would be the villains.
    • Paolo LinxP

      Problem running a macro without any associated key combination

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      5
      0 Votes
      5 Posts
      194 Views
      PeterJonesP
      @M-Andre-Z-Eckenrode said: Possible v8.9.7 bug? I wouldn’t call it a bug. v8.9.7 intentionally made sure that running a Macro performed the same HMAC check as running a Run menu entry. If your PythonScript runs a menu command (either a macro or a run-menu command, especially), it would also trigger that check. Or, if you hadn’t used any of the intervening v8.9.6.2-4 subversions, then your HMAC would never have been updated, and Notepad++ would demand a single validate to your custom shortcuts, becaus of your PythonScript shortcut.
    • donhoD

      Notepad++ v8.9.7 Release Candidate

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      5
      5 Votes
      5 Posts
      3k Views
      donhoD
      FYI: Notepad++ v8.9.7 RC2 is available now: https://github.com/donho/notepad-plus-plus/releases/tag/RC2
    • nft 3000N

      Feature Request: Parallel Processing (Multithreading)

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      14
      0 Votes
      14 Posts
      4k Views
      CoisesC
      @harry-brookes , @peterjones “the devil is in the details” And there are more details than I knew existed. The details have details. It’s easy for a naïve multi-threaded implementation to be slower than a single-threaded implementation, as was demonstrated when @guy038 ran a test of my search on a folder on a USB stick. I’m working now on improving it. It’s incredible how many ways there are to shoot yourself in the foot with multi-threading. I’ll feel validated if I can come up with something that is sometimes better than single-threaded and never worse than single-threaded. It remains to be seen if I can do it.
    • Sylvester BullittS

      When Is the Next Update?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · · bug with 8.9.6.4 html
      4
      0 Votes
      4 Posts
      2k Views
      PeterJonesP
      @Sylvester-Bullitt , Release Candidate is available. You probably want to test this version, and report any continued problems with the Open File feature ASAP.
    • M

      Drag and dropping lines between split view documents?

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      4
      0 Votes
      4 Posts
      2k Views
      M
      @PeterJones said: So, sorry, I don’t know of a way to do that. But I am now curious if someone else knows of a way, or if one of the codebase experts knows why it might not be possible (or whether it’s a feasible feature request or not). (I’d apologize for providing a ‘non-answer’ as my answer, when you haven’t gotten a ‘real answer’ first… but I wanted to caution future respondants to not jump to the same conclusion I did at first without actually giving it a try for themselves.) No worries I like to see how people tackle problems. And with a software as vast as N++ where I know only a small percentage of all the functions, even a non answer shows me something new most of the times. Coises answer does the trick. In an ideal world I’d like a way to switch the behaviour so Alt+drag copies, but for all intents and purposes the solution works for me.
    • Sam FourieS

      New Feature - Lock a Tab

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      3
      0 Votes
      3 Posts
      111 Views
      PeterJonesP
      @Sam-Fourie , It’s been suggested before, as in issue #17430. The developer stated explicitly: It’s not my intesion to “lock” the document by using “Pin a document”. It’s just a way to make the documents grouped in front so users find them more easily. Checked with MS VC Studio, their behaviour is the same as Notepad++, and I think it’s the right behaviour. It works the way the developer wants, and he has rejected the suggestion to make it work the way you want. update: I’m not saying it’s not a good idea. Just that the developer (who is the final decision maker) is the one you’d need to convince. And, given that he’s already rejected the idea, you’d have to come up with something more than “I really want it” to convince him otherwise (and it would have to be posted in the issues tracker, presumably as a reply to the issue I linked, not in the user Community).
    • M

      HELP on Macros - security issue?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      3
      1
      0 Votes
      3 Posts
      140 Views
      PeterJonesP
      User Manual has been updated: Renamed header to “shortcuts.xml Security” and includes mention of Macros as well: https://npp-user-manual.org/docs/config-files/#shortcutsxml-security added Macros Security on the macros page: https://npp-user-manual.org/docs/macros/#macro-security added a paragraph linking to the “shortcuts.xml Security” page in the Running External Commands page: https://npp-user-manual.org/docs/run-menu/#security-is-your-responsibility
    • guy038G

      Generic Regex : How to use the couple of "Backtracking Control" verbs (*SKIP)(*FAIL) or (*SKIP)(*F) in regexes

      Watching Ignoring Scheduled Pinned Locked Moved Blogs
      9
      4 Votes
      9 Posts
      6k Views
      dr ramaanandD
      Another example can be seen at https://community.notepad-plus-plus.org/topic/27601/with-the-help-of-a-regex-how-to-find-code-preceded-by-a-only-if-code-is-absent-between-style-and-style-in-the-css-section-which-is-below/4