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
    • Freon SandozF

      Unexpected match when searching files for an end-quote character (non-ASCII)

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      4
      0 Votes
      4 Posts
      77 Views
      CoisesC

      @Freon-Sandoz said in Unexpected match when searching files for an end-quote character (non-ASCII):

      I can reproduce the file contents and the unexpected behavior

      I was able to do that, too… and now I see what is happening. The character you are calling an end quote is not the Right Double Quotation Mark, U+201D but the Double Prime, U+2033.

      Windows-1252 (and Windows-1254) contains the right double quotation mark at 0x94. However, it does not contain the double prime. The entry boxes on the file dialog are always in Unicode. (That’s how it works pretty much everywhere in modern Windows.) But if the file is in ANSI, the file search is done in ANSI, so Notepad++ asks Windows to translate the string you gave it into ANSI. Seeing that there is no double prime character in your current code page, Windows “helpfully” translates it to something that looks a lot like it… the ASCII double quote.

      Further confusing the issue is that Notepad++ never loads a file in any code page other than your system code page (which you said is 1252) or Unicode. So when you open the file in Windows-1254, Notepad++ is actually converting it from 1254 to UTF-8 and editing that way. That’s why the search behaved as expected in 1254: it wasn’t really 1254 in, it was in UTF-8.

      Bottom line… this behavior actually is “expected”… but not by any normal human being. About the only thing you can do about it is to work in Unicode wherever possible when you are using non-ASCII characters.

      It might be possible for Notepad++ to change its search so that it warned you when you tried to search an ANSI document for characters that aren’t possible in that document. I haven’t looked into it in depth; I would guess there must be a call to WideCharToMultiByte somewhere, and it could be passed the WC_NO_BEST_FIT_CHARS flag and the lpUsedDefaultChar output pointer to detect such shenanigans so the program could tell the user about it instead of potentially claiming to find something that isn’t there.

    • donhoD

      Notepad++ Old Releases Download

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      2
      4 Votes
      2 Posts
      71 Views
      PeterJonesP

      @donho ,

      Thanks for doing that. It’s good to be able to grab older versions, for historical purposes / comparisons, and for people who are trying to use Notepad++ on machines that still have ancient OS installed and cannot be upgraded (like a bunch of early 2000s electronic-measurement equipment that I used to use)

    • T

      How to Use Notepad++ As a Daily Journal

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      2
      0 Votes
      2 Posts
      18 Views
      PeterJonesP

      @tedhettel ,

      With native Notepad++, you cannot get that exactly. But you can get close.

      Notepad++ has a keystroke Ctrl+End to take you to the end of a document, and a menu action (Edit > Insert > Date Time … of three variants, one of which is customizable in settings). So you could record a macro (Macro > Start Recording, Ctrl+End, ENTER, Edit > Insert > Date Time …, ENTER, Macro > Stop Recording) and save it with a keystroke (Macro > Save Current Recorded Macro), which means when you open your logfile, you can do that one keystroke, and it would then take you to the end and put in the date for you. So it would be one extra keystroke when you open the file… but one keystroke isn’t bad.

    • Fred MorantF

      using User Defined Language : v.2.1.0.12

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      4
      0 Votes
      4 Posts
      103 Views
      PeterJonesP

      @Fred-Morant said in using User Defined Language : v.2.1.0.12:

      Let’s create “alphatest” as a name for a new user defined language , close notepad++, new bloc appears in userDefineLang.xml for that “alphatest” , remove it from userDefineLang.xml manually , repopen Notepad++ : you can’t use that name “alphatest” again,

      I cannot replicate. No matter how I try (ie, no matter how I interpret “remove it manually”):

      First try: Start Notepad++ with no userDefineLang.xml existing Language > User Defined Language > Define your language… Create new…: alphatest Set ext: at and close the UDL dialog Exit Notepad++ userDefineLang.xml exists Edit userDefineLang.xml in Notepad++, delete the whole alphatest section, save, exit Notepad++ Run Notepad++: alphatest no longer exists. Create new…: alphatest works without difficulty Second try: Start Notepad++ with no userDefineLang.xml existing Language > User Defined Language > Define your language… Create new…: alphatest Set ext: at and close the UDL dialog Exit Notepad++ userDefineLang.xml exists Run Notepad++, go into UDL dialog, and select alphatest Remove, and answer Yes when it asks if you’re sure. It’s gone. Create new…: alphatest works again immediately. Remove, and answer Yes when it asks if you’re sure. It’s gone again. Exit Notepad++ and restart. Create new…: alphatest works again here, too. I don’t know what else you could mean by “manually delete”

      It works just fine. Again, this is not with v8.9.2. I tried those tests with v8.9.3-RC, and again with the older v8.9.1. It works exactly 100% as expected, and it never prevented me from creating alphatest after I’d deleted it in any way I could think of.

    • Võ Văn HiếuV

      Is there any way to disable the cursed "In selection" checkbox forever?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      2
      0 Votes
      2 Posts
      27 Views
      PeterJonesP

      @Võ-Văn-Hiếu ,

      Settings > Preferences > Searching > Minimum Size for Auto-Checking “in selection”:

      e1b5f537-fcbb-4f03-bfae-356c18eab696-image.png

      It defaults to 1024, meaning you need to select at least 1024 characters in order to get it to checkmark the “in selection” box with the default setting. If you changed it to a lower number (like “1”), that would explain why it always auto-checks that box.

      And if you really want never, instead of >=1024, then set that to 0, as it says when you hover your mouse cursor over the (?) and in the user manual’s section on the “Searching” preferences.

    • วีรภัทร ทวีทรัพย์ว

      The official repository, download.notepad-plus-plus.org, is down!

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      10
      0 Votes
      10 Posts
      707 Views
      PeterJonesP

      see update in this announcement: new github repo with archived versions of Notepad++ at https://github.com/notepad-plus-plus/old-releases

    • Z

      NppCSharpPluginPack: how to add toolbar buttons?

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      3
      0 Votes
      3 Posts
      132 Views
      Z

      @Mark-Olson You are right, thanx Mark.

    • J

      search-and-replace NOOB question - CR and (any number)

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      4
      0 Votes
      4 Posts
      71 Views
      J

      @PeterJones
      hello and Thank You…
      I think I had read all of the references you posted, and must have misunderstood everything.
      (sigh) I’m feeling so old (LoL)
      just used your example and it worked perfectly
      …
      well, except I next will want to enter an exception for cases of a period before the first carriage return.
      I think I know how to get that working, now that you’ve given me a great direction.
      Again, Thank You!

    • dfs-D

      Dark Mode style for UDL

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      3
      0 Votes
      3 Posts
      66 Views
      dfs-D

      Thank you @PeterJones, this is a perfect solution.