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
      113
      5 Votes
      113 Posts
      34k Views
      CoisesC
      @guy038 said: I understood the small differences which occur in the MultiReplace search ( 27,112 - 25 ) matches in ( 833 + 2 ) files. But, I prefer, first, to study more closely the MultiReplace plugin, which is very powerful too and reply later to @thomas-knoefel. It concerns the encoding of 4 files which is not recognized properly and which occurs only when the Find in Files command is used. The Find All and Find in Docs commands, themselves, give correct results for these 4 files !? As best I can make out, like Search++, MultiReplace processes searches against documents open in Notepad++ using the copy of the document that Notepad++ has loaded into Scintilla. (I can’t really think of another way it could be done.) That means that for existing files, Notepad++ has already determined the encoding and either loaded it as ANSI or UTF-8, or translated it to UTF-8. (Notepad++ never sets Scintilla to use any encoding other than UTF-8 or the system default code page; anything else is translated to UTF-8 and translated back on writing.) So it’s no surprise that we’re both using the same encoding as Notepad++ for Find All and Find in Open Documents, because we’re just using the work Notepad++ has already done. I think MultiReplace uses an invisible Scintilla to process searches in files. It could be that it hasn’t entirely replicated the labyrinthine logic Notepad++ uses to determine the encoding of a file (including the effect of Preferences | MISC. | Autodetect character encoding). Search++ does not duplicate that logic either, but it approaches the problem in a different way. Rather than using an invisible Scintilla control, Search++ uses its customized version of Boost::regex directly on the data in the file buffer. So I never translate the file encoding to anything else. I do have to determine the encoding, though, as the choice of iterator for Boost::regex depends on that. There are limitations, not yet formally documented, to the way Search++ handles encodings for Search in Files: UTF-16 files without a byte order mark are not recognized as such. (They’ll be misread as something else.) UTF-8 files without a byte order mark that contain any invalid UTF-8 sequences will be processed using the system default (ANSI) code page. Pure ASCII files are processed as UTF-8. (This doesn’t matter for Find, but I will have to review it when I implement Replace, since someone might include non-ASCII characters in the replacement text. I think there will have to be a user control to determine whether to promote ASCII to ANSI or to UTF-8.) Files without a byte order mark that are not pure ASCII and contain any invalid UTF-8 characters are processed using the system default code page. No attempt is made to detect whether a different legacy code page is more likely to be correct, or is explicitly declared within the file. The sad fact about file encoding is that in most cases there is no algorithmic way to be absolutely certain about what it is. (The exceptions are pure ASCII — but then, if any non-ASCII characters are introduced, there is no way to know how those should be encoded — and some file types, like HTML and XML, that can include a declaration of their own encoding, the declaration itself being in plain ASCII. Byte order marks are, in practice, another exception: they could occur in a legacy encoding, but they would be so uncommon at the start of a file that it’s safe to assume they are definitive, or the file has been purposely engineered to cause mis-detection.) I will probably improve handling of file encodings as Search++ evolves. I doubt that I will attempt to duplicate exactly what Notepad++ does.
    • 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).
    • J

      Issues with XML highlighting text

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

      Notepad++ release 8.9.7

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      5
      2 Votes
      5 Posts
      3k Views
      Guilhem BortoliniG
      @donho @xomx Hi, I’m so sorry for the late response. Thank you so much for the tip ! When I disabled “Run this program as an administrator” for the Notepad++ executable, “Edit with Notepad++” started working again. Thanks for your help, and thank you for all the work you put into Notepad++.
    • 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
    • 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.
    • 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
    • R

      Unable to open files within an opened file

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      3
      3
      0 Votes
      3 Posts
      1k Views
      R
      @PeterJones Perfect thank you very much!
    • R

      SnippetPlus v2.1 released. Snippets, SurroundWith and SurroundWith Multiline plugin

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      3
      1 Votes
      3 Posts
      1k Views
      R
      @rdipardo thank you for pointing that out. I will check and do the needful.
    • H

      How do I reset back to the default Dark Mode style settings?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      3
      0 Votes
      3 Posts
      2k Views
      Lycan ThropeL
      @Howard-Brown @peterjones has given you the necessary information to get back the default DarkMode settings, so you should learn from this issue and do what I did, and make your own DarkMode settings by copying that file, and giving it a different name. I called mine MyDarkModeDefault to avoid the confusion, and played with it to my hearts content. Doing this trick, even with your new default version, you can make another copy and continue to fine tune what you need to, without damaging the default, or your own new default versions. Call it MyExperimentalDarkMode, and have fun without worrying. As @peterjones and many of us around here always say, “back up what you don’t want to lose or recreate” - though that is paraphrasing. :-)
    • Jon FlemingJ

      NPPexec Tidy won't open html file.

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      3
      0 Votes
      3 Posts
      2k Views
      Jon FlemingJ
      Thanks, your script works perfectly.
    • AGoh2019A

      Print Quality TERRIBLE & Non very useful

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      7
      0 Votes
      7 Posts
      3k Views
      K
      @vvPeterJones I switched Settings>Preferences>Print from “No background color” to “Black on white” and the print is much better.
    • L

      Unicode 'ÿ' , problem converting to Hex 'FF'

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      39
      1
      1 Votes
      39 Posts
      22k Views
      Lance MarchettiL
      @PeterJones Great. Thanks