• Encoding not retained when moving a file to a new instance.

    Locked
    3
    0 Votes
    3 Posts
    867 Views
    guy038G

    Hello @compu-chan and All,

    On my Win XP configuration, I did a test :

    I downloaded the 7z archive of the last 7.5.8 version of Notepad++

    I extracted all files in folder D:\Test

    I started N++ and I customized in Settings > Preferences.. my usual settings and, particularly, the Backup > Remember current session for next launch option

    As you, I set the default encoding to OEM-US encoding, in Setting > Preferences...> New document > Encoding

    Then, I opened several files ( change.log, license.txt, readme.txt )

    => Of course, the default encoding used, for existing files is ANSI

    So, I changed, for instance, the encoding of the readme.txt file to OEM-US

    => And, after closing and re-starting Notepad++, I do get the same OEM-US encoding for the readme.txt file !

    Now, I opened a console DOS window and moved to the D:\test folder

    With the command notepad++.exe -multiInst, I opened a new instance of N++

    => As expected, this 2nd instance contained all the files of the 1st instance ( current session ) and the encoding of readme.txt was, indeed, OEM-US

    Then, I closed this second instance and re-opened it, without any session, with the DOS command notepad++ -nosession -multiInst

    => As expected, only a new 1 file was opened, with the customized encoding OEM-US

    I opened the readme.txt file and, this time, as you saw, the encoding of readme.txt was ANSI !

    Again, I closed this second instance and re-opened it, without any session, with the DOS command notepad++ -nosession -multiInst

    Now, using the Ctrl + Drag and Drop, I copied the readme.txt tab of the 1st N++ instance to the 2nd N++ instance

    => Again, the default encoding of the readme.txt file was ANSI

    Simply, note that this behaviour is identical, if no 2nd instance is involved in process ! Indeed :

    Close any supplementary instance of N++

    Now, close your 1st N++ instance

    => On re-starting N++, the readme.txt encoding is still OEM-US, according to information of the session.xml configuration file

    Then close ( Ctrl + W ) the readme.txt tab and re-open it with the Restore Recent Closed File command ( Ctrl + Shift + T )

    As during the tests, above, with a 2nd instance, the initial OEM-US encoding is lost and the default ANSI encoding is chosen for the readme.txt file !

    Conclusion :

    You must live with this small drawback :-((. And, to my mind, if you want to keep a chosen encoding, taken from Encoding > Character Sets, for a given file, from one session to another, closing and re-starting N++, the only way seems :

    Get the option Remember current session for next launch ticked, in Preferences... > Backup

    Do not close the given file’s tab, before exiting N++

    Best regards,

    guy038

  • My session.xml have been wiped out... Can I recover it?

    Locked
    1
    0 Votes
    1 Posts
    511 Views
    No one has replied
  • 2 Votes
    6 Posts
    1k Views
    蘇浩宇
    [list item]([link url]([link url]([link url](******************************** [link url]([link url]([link url](link url)))********************************))))
  • NotePad ++ V7.5.7

    Locked
    5
    0 Votes
    5 Posts
    1k Views
    Meta ChuhM

    @lee-platt

    if you close notepad++ and open an explorer window:

    can you see file extensions of known file types inside an explorer window ?
    (eg. can you see the .pdf extension of a pdf if you browse to one within the windows explorer ? )

  • Regular Expression: Urgent Need Plz Help

    Locked
    17
    1 Votes
    17 Posts
    4k Views
    PeterJonesP

    @Rumi-Balkhi ,

    This is the point when you need to start reading and understanding where to find regex documentation, which I linked earlier.

    This is not a professional regex-writing forum. We are users of Notepad++, who want to help others learn more about NPP (and learn more ourselves, in the process). Since Notepad++ makes use of regular expressions, we will often provide help with regex questions.

    However, after this many rounds, you really need to start applying what you’re learning. Because you are learning, right? We’re not just doing your job for you. Because if we were, we’d be charging you consulting rates.

    To reluctantly answer your question, “Suppose the symbol is not : its a ?”. The obvious choice would be to try replacing the : from the regex with a ?. Did you try that? What happened? If you did try it, it wouldn’t have matched, so you could have said “when I tried to replace the : with a ? in the regex, it didn’t match/highlight the question mark when I hit FIND, or replace the ? when I hit REPLACE… Why not?” At that point, you would have shown a willingness to learn how to do it, to generalize from what you’ve been shown, and to ask questions about what you tried, rather than hoping we’d do all the work for you. (Such a lost opportunity. :-( )

    After you asked that question, one of us could have replied, "if you follow the link to where to find regex docs, the first link there is the NppWiki:Regular Expressions page; you can search that page for ?, and learn that in regular expressions, ? means to match 0 or 1of the last character – the last “character”, in that case, actually being the match in parenthesis just before it. If you want to match the literal of a special character in a regex, you have to escape it by putting a \ in front of it… so to match a literal question mark, you would use the sequence of \? in your regex.

    So, if I take @guy038’s (?-s)((?:.*(\R)){2}.*football):?, which matches to a colon, I would change it to (?-s)((?:.*(\R)){2}.*football)\?? to match a question mark instead.

    If you’re going to be doing more regular expressions, spend some time in the list of regex documentation. It will help you.

  • combining 3 commands for a text

    Locked
    12
    0 Votes
    12 Posts
    2k Views
    Scott SumnerS

    @guy038

    …information provided by RegexBuddy

    I got the go-ahead approval from Jan Goyvaerts, author of RegexBuddy, to post its decodings here. In return I promised to give credit where credit is due and indicate where the decodings originated. Of course, I’m not going to do this all the time, but if someone asks for an explanation of a regex that is a bit, shall we say, above and beyond…then why not, eh?

    …to end with a pleasant note…

    Wha? I’m always pleasant, aren’t I? :-)

    do not consider that letter y is a vowel

    Hahaha. I actually struggled a bit with what I should do to turn my BEFORE text into AFTER text…

  • NotePad ++ V7.5.7

    Locked
    1
    0 Votes
    1 Posts
    449 Views
    No one has replied
  • Character sets

    9
    2 Votes
    9 Posts
    7k Views
    guy038G

    Hi, @nikola-androić,

    Sorry to be late :-(( I was building a list of, both, monospaced and proportional fonts, which could support the ISO 8859-16 encoding and I, also, updated my own list of valuable monospaced fonts for Notepad++ :-))

    However, to possibly solve your problem, it would be better to test with the real file, indeed ! So, could you, please, send me, by e-mail, your subtitle Croatian file, or part of it, in case of important size ?

    Of course, I would fully understand if you do not accept because of confidential or personal data !!

    My e-mail address is :

    Best regards,

    guy038

  • Damaged *.xml file after editing it on a flash drive

    Locked
    2
    0 Votes
    2 Posts
    708 Views
    Scott SumnerS

    @Tobias-Fieger

    Unless you can be elaborate some more I don’t know that anyone can be convinced that Notepad++ did something to your file.

  • Export Notepad++ to a new computer

    Locked
    3
    0 Votes
    3 Posts
    9k Views
    Jim DaileyJ

    @Maryvincent-Hussein

    Also, if you install notepad++ using the “portable” option (at least I think that is what it is called), then most (perhaps all) your files will be somewhere within the directory where you install. Then you can simply zip up that directory and unzip it on some other computer.

    I’ve been sharing my notepad++ setup with co-workers this way for some time now. They get all my plug-ins, various XML configuration files, user-defined languages etc. as if they were part of notepad++.

  • 0 Votes
    4 Posts
    970 Views
    Daniel marksD

    Fixed! the texts is in windows.old/users/appdata/roaming/notepad++/backup just copy backup folder inside the actual place.

  • Is it possible to edit/modify a "Language"

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    Jim DaileyJ

    @Henri-Monnier

    Short of modifying the lexer or creating a user-defined language, there are a couple of small changes you can make to the way a language is highlighted.

    First, you can add new “words” of various kinds to be highlighted by editing the stylers.xml file.

    Second, you can use the menu option Settings–>Style Configurator to change the appearance of various language features.

  • QUICKFIX for python

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    Kartik ParasharK

    Got it, thanks.

  • Regular Expression, How to a delete Symbol

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    Rumi BalkhiR

    Sorry for that. Would you please help in this case

  • Mixed Line Ending Detection. Possible?

    12
    0 Votes
    12 Posts
    6k Views
    Scott SumnerS

    @Scott-Sumner said:

    normally it is a difficult task to get a wrong line-ending in your editor buffer

    Apparently I shouldn’t have made that statement, as I keep proving it wrong…

    I normally work with Windows formatted files with \r\n line-endings. I just noticed that pressing ctrl+m (which got done when my fingers got tangled up) will insert a Mac format line-ending \r in my Windows files–blech!.

    :-(
  • Liberty Basic

    Locked
    1
    0 Votes
    1 Posts
    582 Views
    No one has replied
  • Find / Replace with TOOLBUCKET

    Locked
    3
    2 Votes
    3 Posts
    1k Views
    Rübel RundR

    Thanks a lot.

    It works with a little change(REPLACE: $0(HELLO WORLD\r\n) ) in my file.

  • how to restore default shortcuts

    Locked
    7
    1 Votes
    7 Posts
    2k Views
    Meta ChuhM

    @Scott-Sumner

    got one more ;-)

  • relative paths in search results

    5
    2 Votes
    5 Posts
    21k Views
    Scott SumnerS

    I would think (haven’t checked the Notepad++ source code) that in order to jump to hits when they are double-clicked in the Find result panel, Notepad++ actually reads the data out of the panel itself to determine file path…so it can switch to (or open) the necessary file and jump to the correct line.

    Thus, I would modify my previous suggestion from showing only this in the Find result panel:

    ...\lua\effects.lua (2 hits)

    to displaying something more along these lines:

    ...\lua\effects.lua (2 hits) - C:\Users\Daniel\Documents\My Games\Wesnoth1.14\data\add-ons\World_Conquest_II\...

    That way Notepad++ could put the complete path back together when needed.

  • RegularExpression, replace with to keep some variables

    Locked
    4
    1 Votes
    4 Posts
    1k Views
    Terry RT

    Thanks for the correction guy038. It was late at night, and I didn’t test my answer before presenting it. Funny enough I had thought of capturing the \h and re-using it but I never presented that in my solution.

    Terry