Menu

$(CURRENT_WORD) is limited only to 259 chars

2009-02-27
2012-11-13
  • Edoardo Tirtarahardja

    It seems the variable $(CURRENT_WORD) can only hold 259 characters.

    I try to have an external command to decode messages. This messages can literally very very long. Unfortunately the variable $(CURRENT_WORD) has limited length and truncate the message hence my decoder fail to decode it.

    How to reproduce the fault:
    type in 1 line:
    123456789012345... (upto 270 characters)

    Then run an external command (Run\Run) and type in:
    cmd /k echo $(CURRENT_WORD)
    And execute it.

    A command prompt window will pop up and echoing only the first 259 characters.

    The older version of NPP (upto 5.1.1) used to crash, but the NPP 5.2 is better, however it truncate it. But I need this function as some of my messages goes a lot longer than that.

    I tried to make my group using NPP instead of the expensive MultiEdit, however this fault may hinder this :(. Can you please fix this?

    Thank you very much for your kind attention.

    Cheers //Edo

     
    • Don HO

      Don HO - 2009-03-02

      I can increase the size, but it'll be static.
      Let me know the maximum size you prefer.

      Don

       
      • Edoardo Tirtarahardja

        At least 2048 chars as that seems to be the limit on Win2K CMD.EXE. It might be bigger for vista though.

        Thanks for quick reply.

         
        • Don HO

          Don HO - 2009-03-03

          2048 is not a reasonable word length for me.
          I will increase 260 * 4 = 1040, so 1039 characters.

          Don

           
          • Edoardo Tirtarahardja

            Hi Don,

            But $(CURRENT_WORD) does not contain a single word, right? It should contain the selected words. Well in fact actually in contain the selection and not really subject to word boundary. So it is possible for a user to select a very long line (that contains a lot of word) and that what happen with my log file.

            My log file may contain a hex dump of a message that can go very long. For ex:
            10:36:59.828 4690        DL DCCH:22 46 00 3b 16 80 6c ......
            Unfortunately there is no limit how long this message can go, the longest currently I've seen goes up to 600 chars in total for the whole line. From 1 release to the new release (I work on 3GPP technology) I've seen the message just keep getting longer and longer as the system getting more & more complicated hence need more parameters.

            I just hate to come back to you and requesting an increase when it indeed goes beyond 1039 chars.

            Currently the limit on CMD.EXE for the total length of a command is 2047 & 8191 chars for Win2k & XP accordingly (http://support.microsoft.com/kb/830473). Hence I requested the $(CURRENT_WORD) to be at least that length (it will be good if depending on the OS used, it's configured accordingly). If my message ever go beyond that, then my company just have to figure out how to decode that as in this case we can't call a windows program and pass the argument that long.

            What do you think?

            Thx //Edo

             
            • Don HO

              Don HO - 2009-03-04

              ok, then it'll be 260 * 8 = 2080, 2079 characters.

              Don

               
              • Edoardo Tirtarahardja

                Thanks Don!! Highly appreciate that. Looking forward for the new release so I can start asking my group to use NPP. Again thanks for great apps.
                Cheers //Edo