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
    • Bjorgen EatingerB

      The Nightmare %> Issue

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      19
      0 Votes
      19 Posts
      349 Views
      PeterJonesP

      @Bjorgen-Eatinger said in The Nightmare %> Issue:

      This issue only occurs in a case like this:

      Sadly, you did not give nearly enough for us to be able to investigate your problem any further. I put in exactly that line (and only that line) into bjorgen.asp on my local IIS, and when I go to that page, it gives me a server error:
      5728353b-eb82-47ee-baa1-0082457cc706-image.png

      … And I confirmed that other pages, like the one I showed above, are still working on my local server.

      From what I understand, the ' as a comment is VBSCRIPT syntax, not ASP-specific syntax. Because I thought everything outside of <% ... %> was just interpreted as ASP (and my quick web searches seem to confirm that conclusion on my part). In which case, putting the ' before a <% ... %> line is not “commenting out” anything, it’s just putting a single-quote in the static HTML portion of the code. Moreover, you aren’t supposed to nest <% ... %> inside each other, as far as my searches tell me. So your single line is really confusing… because if it’s outside of a containing <% ... %>, then I don’t see why you think that the ' is commenting anything. And if it’s inside a containing <% ... %>, I don’t see why you have another <% ... %> nested inside. This is why a complete example is needed for us to be able to see what you mean. It doesn’t have to be huge – my example document from earlier (with the . ' what goeth here in the rendering) is only about a dozen lines.

      And per the Microsoft documentation linked in the Lexilla issue,

      <% i = i +1 'This statement increments i. (This script will work.) %>

      … is valid / complete syntax: the ' comment only comments out the text portion – the %> closer tag does not get hidden by the comment inside the <% ... %>.

      Taking that line, and putting it into zufuliu.asp with a few other lines,

      Text before <% i = i +1 'This statement increments i. (This script will work.) %> text after <br>i = <%= i %>

      … to actually render something in the webpage, I see:
      d8c908a2-4250-41f8-85a7-07f073fe642a-image.png
      And Notepad++ is highlighting that as expected: the i = i + 1 is code, the 'This statement increments i. (This script will work.) is a comment, and the %> still closes the code, and everything after still runs.

      Moreover, if I use a ' to “comment out” the <% ... %> line, it doesn’t actually make that code not run. It just interprets the ' as part of the HTML, not as part of the VBSCRIPT.
      2a2540ba-16a9-4beb-957d-da2b7353ae7e-image.png

      So your single line of ' <% Sub ApplyPasswordReset(oConnGlobal, postData, ByRef result). %> does nothing to show us where the bug might be, or what’s going wrong.

      To be able to prove whether there’s a bug in Lexilla, a bug in Notepad++, or just user error, you need to give a complete known-good ASP code that shows the problem, that we can open with IIS to see that the code works as expected (ie, to show it’s valid ASP that you are trying to edit), that we can open with Notepad++ to see that it highlights “wrong”, and opens with SciTE to show that it highlights “right” or “wrong” depending on what you say (the last time, I believe I understood you to say that it was rendering right in SciTE),

      If you want help, you need to give all the information from the 3 simple steps I put in my last post and reiterated here. Please understand, I am not saying this to be mean: the Lexilla people do not believe there is a bug in their library (the issue has been closed as PEBKAC). Nothing you have shown us gives evidence of a bug in Notepad++. If you don’t provide exactly what I described above, your report will be diagnosed to be user error, and nothing will ever happen.

      At this point, it’s your decision as to what happens next.

    • N

      Standard ANSI and code still change to something else

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      14
      2 Votes
      14 Posts
      294 Views
      CoisesC

      @NolanNolan said in Standard ANSI and code still change to something else:

      But really weird that using Microsofts own notepad.exe that comes with a standard windows installation makes windows search not detect characters in txt files that belongs to the installation language of the OS.

      Perhaps not quite as strange as it might first appear.

      Support for Unicode in Windows dates back to the first release of Windows NT in 1993. (NT was a “business” operating system; it took another eight years or so to get Unicode into “consumer” systems.) The thing is, Windows chose to support 16-bit characters: UCS-2, which later became UTF-16. UTF-8 wasn’t even presented publicly until 1993, and it took many more years for it to become popular. Most early adopters of Unicode, like Windows, used 16-bit “wide” characters.

      So, for a long time, in Windows “Unicode” meant UTF-16. Windows XP (2001) introduced code page 65001 for UTF-8, but it was only useful in conversion functions and console sessions. In Windows 10 Version 1903 (May 2019), it became possible to set UTF-8 (65001) as the system code page; however, that doesn’t (yet, in 2025 at least) do as much as you might hope it would, and it can precipitate odd behavior in software. (I tested your specific case: setting Use Unicode UTF-8 for worldwide language support does not change how search in Windows Explorer interprets files without a byte order mark.)

      Files using legacy (“ANSI”) encodings are too common to ignore, but, as @PeterJones pointed out in his earlier post in this thread, there is no completely reliable way to distinguish an “ANSI” encoding from UTF-8. Windows chose to use the byte order mark (already in use in UTF-16 files) to signal when a file is UTF-8. Windows simply does not recognize a file without a byte order mark as Unicode.

      Notepad++ uses byte order marks, too, but it also recognizes when a file has a very high likelihood of being UTF-8 (without a byte order mark). This is possible because the details of UTF-8 encoding make it highly unlikely that a legacy text file will “accidentally” also be a valid UTF-8 file — unless it is very short, has been intentionally crafted to trigger false detection, or contains only ASCII characters. (Since ASCII characters are represented identically in UTF-8 and in legacy code pages, the last case only matters if you edit a file which contained only ASCII characters so that it contains one or more non-ASCII characters. In that case, it is important to set your intended encoding depending on how the file will be used.)

      What you’re confronting is the difference between how Windows detects UTF-8 (must have a byte order mark) and how Notepad++ detects UTF-8 (valid UTF-8 byte sequence, which is statistically highly unlikely to be a legacy encoding).

      There is no good solution to this without inventing a time machine and changing decisions that were made over three decades ago.

      Well… no good solution that does not sacrifice reasonable backward compatibility. I consider that one of Windows’ best features, and I admire Microsoft for sticking to it. Twenty-year old programs can still run on current versions of Windows. I hate the culture of “If it’s not constantly maintained and upgraded, junk it!” that’s overtaken most of the computing world. A job once done well should stay done. (I suspect this has a lot to do with Microsoft’s dominance in business applications.) Not everyone shares my view.

    • donhoD

      Notepad++ 8.8.8 release

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      13
      1 Votes
      13 Posts
      3k Views
      donhoD

      @Lukas-Mayr
      Please check if it’s what you need:
      https://download.notepad-plus-plus.org/MISC/npp.Installer.x64.msi

      Command line: msiexec /i Notepad++.msi NOUPDATER=1

    • N

      How to change file icon on txt files ?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      11
      0 Votes
      11 Posts
      299 Views
      N

      @PeterJones

      i have to hand it to you this worked, thank you :-)

      I couldnt find this description elsewhere, i tested all the 3 thirdparty apps, wthy didnt work though

      I seems to have missed the reg addition of defaulticon should be in the string sith notepad++

      best Nolan

    • SuperCPUS

      How to set a different background color for the text before a certain line?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      10
      0 Votes
      10 Posts
      535 Views
      SuperCPUS

      @mpheath

      I had to save the UDL with and it worked very well, thank you very much!

    • MM tsuchiM

      Notepad++ 8.8.7 "select and search next/previous (Ctrl-F3 / Ctrl-Maj-F3) don't work anymore

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      9
      0 Votes
      9 Posts
      380 Views
      Alan KilbornA

      When the Fill Find Field with Selected Text option, in settings, is unchecked, and the user invokes Select And Find …, perhaps the program should (simply) run the code for the “volatile” version of the command.

      (I should have said this in my previous post.)

    • Vince AmanV

      Save and Restore Change History Markers

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      10
      1 Votes
      10 Posts
      642 Views
      Vince AmanV

      @mpheath ,

      Thanks again for you reply! I plan to test your BufferRestore script after my next “break” in my current project(s). After looking closer at your post and web page, this looks to be a good option for me to use until NP++ has a built in tool…

      I do own a rack of servers and plan to spin up a couple extra VMs once I release my own platform/environment for my apps (within the next couple months). The challenge with one of the (main) current platforms which I’m using is, while I pay annually to be a developer for them, their licensing does not allow me to run on more than 1 PC at a time, so it requires me to log out/in each time I switch between PCs or VMs. I can’t maintain the variable “state” if forced to log out.

      There are many additional issues with Windows Rebooting… When the current test environments get “killed”, all the opened files are now locked and all the variables are flushed. So it requires unlocking the files, and recreating the previous workflow to recreate the variable “state”. Using a log file doesn’t work well in this environment, because it typically goes back beyond the last save… and could only be applied if the saved file was in the exact state as when the log file was started… not sure if that makes sense?

    • pbarneyP

      PHP Linter PythonScript

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      8
      0 Votes
      8 Posts
      554 Views
      PeterJonesP

      @pbarney said in PHP Linter PythonScript:

      my impression is that Pythonscript ships with 2.8

      From Plugins Admin, PythonScript v2.1.0 uses Python v2.7.18 (as far as I am aware, there is no such thing as Python v2.8).

      However, if you go to the PythonScript releases page, you will see that there is also an “alpha” track of PythonScript v3.0.x (currently at 3.0.24), which use Python v3.12.xx. This is the route I personally recommend (caveat below).

      The maintainer of PythonScript has chosen not to take PythonScript 3 out of “alpha” until it fully supports non-unicode encodings (ie, until it supports the 1980s-style character set encodings), so until that point, to get a maintained version of the Python interpreter for PythonScript, you have to manually install an alpha version of PythonScript – essentially, you have to put up with legacy syntax of Python if you want to deal with legacy non-unicode encodings of text. I personally have no need of supporting 80s technology for file encodings (and I pity anyone for whom their circumstances demand that they deal with file encodings that haven’t been brought into this millennium anytime in the last quarter century), so I use the 2020s version of Python for my PythonScript. (My personal opinion is that PythonScript should start shipping PythonScript 3 as non-alpha, and that they just prominently make it clear that if you have to deal with the old character sets that you should instead install the outdated PythonScript2 version from the releases page. But my opinion on such things holds no weight.)

    • Doctor RashirD

      How to Print Pretty with missing close tags.

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      7
      0 Votes
      7 Posts
      204 Views
      PeterJonesP

      @guy038 said in How to Print Pretty with missing close tags.:

      Let’s start from your solution

      I’d hardly call it “my” solution. In that I used your generic find/replace-in-region formula, and plugged in reasonable values for the “variables” from that generic formula. The whole point of that generic formula is to make it really easy for anyone to just plug in their BSR/ESR/FR into the formula, and have it “just work”, without having to optimize or tweak.

      If I run, successively,

      As @Doctor-Rashir said here, “There are many closed tags”… In other words, it’s not just SONRQ and SIGNOMSGSRQV1, and trying to manually run a separate regular expression for each of the “many closed tags” is thus not practical. That is why I went to a script to automate it.

    • donhoD

      Making a new release...

      Watching Ignoring Scheduled Pinned Locked Moved Humour
      6
      5 Votes
      6 Posts
      286 Views
      xomxX

      @donho
      Good attempt, just for surety, why not ;-)

      And I’ve to admit that I used to “abuse” churches too - in the summer it was nice and cool there and, most importantly, quiet, so I could study there and prepare for my exams :-)

      @Terry-R @Lycan-Thrope

      Otherwise on topic - there are IMO no complete atheists (in the sense of believing in something that is beyond my reach or ordinary understanding), everyone has their own faith. But while someone believes e.g. that gravity will still work tomorrow when they wake up, someone else believes in the virgin conception of the Virgin Mary, when the Holy Spirit entered her. For me, religion just parasites on and shackles the natural human need to believe in something better/bigger, something that gives human existence true meaning and a greater dimension.

    • Barry LortB

      Move Line Up

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      6
      1 Votes
      6 Posts
      336 Views
      Barry LortB

      @guy038

      More good information. Thank you!

      Barry

    • Tnega TercesT

      How To Read And Edit ASCII File with HEX Values Inside

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · · ascii hex value
      6
      1 Votes
      6 Posts
      729 Views
      Tnega TercesT

      Thank you guys all so very much, now that I know that it’s a GVAS file, I’ll chase down that lead and try to get somewhere!!!

    • Hyung-jun ChangH

      Feature Request : option to disable auto expand of folders

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      5
      1 Votes
      5 Posts
      73 Views
      mpheathM

      @Hyung-jun-Chang

      I really don’t see how people would prefer auto expanding behavior but even if I’m in the minority, I’d like to be offered an option, please :( …

      The auto expanding behavior is usually good though at times is disruptive. If you search for a word then a match may ensure the line is visible which may cause the fold to collapse so that you can see the match.

      Reminds me of this issue #12121 where posted some Lua code to help prevent auto expanding behavior. It is not an ideal solution but may help a little with that particular problem. The behavior that makes expanding happen for you is not clear with your problem to know what may help.

      In the Lua code, notice the change of this setting

      SC_AUTOMATICFOLD_NONE = 0 editor.AutomaticFold = SC_AUTOMATICFOLD_NONE

      which disables auto folding. View editor.AutomaticFold for more details. Need LuaScript plugin for the Lua code. Many of the other scripting plugins can possibly do this function call too.

      And if I can inconvince you more, it’d be even nicer if I can collape folders from the bottom as well. As of right now, collapse button(“-”) is only at the top left side.

      The tail fold line can be the last hidden line when a fold is collapsed so unsure how that line can possibly have a visible tail fold marker.

    • h-jangraH

      Which lang other then c/cpp to build plugins

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      5
      0 Votes
      5 Posts
      107 Views
      h-jangraH

      @Ekopalypse I tried simple plugin now using go. It did worked, let see if I can improve. If its good then I should make template for it.

    • h-jangraH

      Inline markdown preview & better note taking plugin idea

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      5
      0 Votes
      5 Posts
      400 Views
      EkopalypseE

      @h-jangra

      I doubt that you can implement this in Scintilla in a reasonable way, but the other idea of having a preview is there, and there are at least two plugins, here and here that can give you some ideas.

    • Andrei Mincov 0A

      How do I disable updates FOREVER!

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      5
      0 Votes
      5 Posts
      78 Views
      Andrei Mincov 0A

      @PeterJones I think I found the culprit behind this.

      Looks like I had my Avast autoupdater to ON, and probably it was the reason behind quiet updates for both Notepad++ and my Mozilla Thunderbird 42.

      It became a routine for me to reinstall old versions over and over and over agian.

      Thank you for your response.

      Really appreciate your help and detailed approach.

    • Doctor RashirD

      Edited Post content was flagged as spam

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      5
      0 Votes
      5 Posts
      80 Views
      Doctor RashirD

      @PeterJones
      Thank you for the reply. Yes, I understood that inference. I was hoping there was additional tweaks to try. Yes, I could do a reply. It was triggered on a very minor edit. Maybe the site support would be interested in the issue. But it’s not important to me now.

    • Rick KostersR

      can't find words with search in files

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      5
      0 Votes
      5 Posts
      229 Views
      László BotkaL

      @Rick-Kosters

      You can try the free Agent Ransack utility from https://www.mythicsoft.com
      It works with .doc, .docx and .pdf files too.

    • C

      possible to create a openfile dialog under jn-npp-plugin ?

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      5
      0 Votes
      5 Posts
      499 Views
      C

      after a look at jn-npp-plugin on github it seems Win32 API is not available in win x64 and i didn’t find other way to use openfiledialog…
      i am looking at python plugin now .

      thanks for your help

    • G

      Contribution Guidelines Regarding LLMs

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      5
      0 Votes
      5 Posts
      265 Views
      Alan KilbornA

      @rdipardo

      I didn’t mean that I run and hide from anything that AI is touched or influenced by. That wouldn’t be practical.