Loading ...
Sorry, an error occurred while loading the content.

CR, CRLF, etc

Expand Messages
  • Jean-François Colas
    Hi everybody, I have to manage some texts whose lines end with the only ascii character 13, without the character 10. NoteTab Light 6.2 recognizes those files
    Message 1 of 13 , Aug 27, 2012
    • 0 Attachment
      Hi everybody,

      I have to manage some texts whose lines end with the only ascii
      character 13, without the character 10. NoteTab Light 6.2 recognizes
      those files as Mac format. To make them more DOS/Windows compliant, it
      seems I have to do two things:
      1) in Document / Properties, set the "Save as" field to DOS/Windows,
      instead of Original,
      and then:
      2) replace with RegEx, \R by \r\n

      Here is my double question:

      Do I really need those two steps?
      If so, can I achieve that by a script, by any other way than ^!Keyboard?

      Thanks,
      J.-F.
    • Adrien Verlee
      ... A while a go, someone wrote about: http://www.sttmedia.com/textconverter Maybe worth to look if it do the job. -- Adrien
      Message 2 of 13 , Aug 27, 2012
      • 0 Attachment
        Op 27/08/2012 17:31, Jean-François Colas schreef:
        > Do I really need those two steps?
        > If so, can I achieve that by a script, by any other way than ^!Keyboard?

        A while a go, someone wrote about:
        http://www.sttmedia.com/textconverter

        Maybe worth to look if it do the job.
        --
        Adrien
      • loro
        ... Saving a copy as DOS/Windows should suffice. Lotta
        Message 3 of 13 , Aug 27, 2012
        • 0 Attachment
          At 17:31 2012-08-27, you wrote:
          >Hi everybody,
          >
          >I have to manage some texts whose lines end with the only ascii
          >character 13, without the character 10. NoteTab Light 6.2 recognizes
          >those files as Mac format. To make them more DOS/Windows compliant, it
          >seems I have to do two things:
          >1) in Document / Properties, set the "Save as" field to DOS/Windows,
          >instead of Original,
          >and then:
          >2) replace with RegEx, \R by \r\n
          >
          >Here is my double question:
          >
          >Do I really need those two steps?
          >If so, can I achieve that by a script, by any other way than ^!Keyboard?

          Saving a copy as DOS/Windows should suffice.

          Lotta
        • John Shotsky
          The following clip is embedded in the beginning of any clip library I create. ;Make all CR s the same ^!Replace R r n ARSW If you are working with
          Message 4 of 13 , Aug 27, 2012
          • 0 Attachment
            The following clip is embedded in the beginning of any clip library I create.
            ;Make all CR's the same
            ^!Replace "\R" >> "\r\n" ARSW

            If you are working with regular text, you probably should set the option to dos/windows too. Mine is always set that
            way, as I only work with windows text, web pages, etc. You would change it if you needed to save it a different way.

            Regards,
            John
            RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/

            From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Jean-Fran�ois Colas
            Sent: Monday, August 27, 2012 08:31
            To: ntb-clips@yahoogroups.com
            Subject: [Clip] CR, CRLF, etc


            Hi everybody,

            I have to manage some texts whose lines end with the only ascii
            character 13, without the character 10. NoteTab Light 6.2 recognizes
            those files as Mac format. To make them more DOS/Windows compliant, it
            seems I have to do two things:
            1) in Document / Properties, set the "Save as" field to DOS/Windows,
            instead of Original,
            and then:
            2) replace with RegEx, \R by \r\n

            Here is my double question:

            Do I really need those two steps?
            If so, can I achieve that by a script, by any other way than ^!Keyboard?

            Thanks,
            J.-F.



            [Non-text portions of this message have been removed]
          • Art Kocsis
            ... ... Theorectically, perhaps not for simple editing. But in working with clips that were sensitive to the exact line termination characters I found I
            Message 5 of 13 , Aug 27, 2012
            • 0 Attachment
              At 8/27/2012 08:31 AM, Jean-Francois wrote:
              >Hi everybody,
              <snip>
              >Here is my double question:
              >
              >Do I really need those two steps?
              >If so, can I achieve that by a script, by any other way than ^!Keyboard?

              Theorectically, perhaps not for simple editing. But in working with clips
              that were sensitive to the exact line termination characters I found I had
              to first convert the entire file to DOS/Windows CRLFs to get reliable results.
              Although the Notetab docs say that NT works internally with the DOS/WIN
              format, I found that to be untrue.

              Add the clip below too your clip library, name it (I named mine Cnvrt to CRLF),
              drag the name to your clipbar (View | Clipbar), right click on the button,
              choose
              "Button Properties" and select an icon for it. Now a simple click on the icon
              will convert the entire document and prevent any problems. (BTW, you still
              need
              to set the Save as option to DOS/Win or you will undo the clip when you save
              the doc.)

              ^!Replace "\R" >> "\r\n" AIRSTW
              ;workaround for RegEx/NTB not handling 0Ch correctly
              ^!Replace "\x0C" >> "" AIRSTW
              ^!Jump Doc_Start

              Namste', Art
            • Jean-François Colas
              Hello John & all, Thanks all. It seems I still need setting the save format for any individual document to DOS/Windows , though the option in View / Options,
              Message 6 of 13 , Aug 28, 2012
              • 0 Attachment
                Hello John & all,

                Thanks all.

                It seems I still need setting the save format for any individual
                document to "DOS/Windows", though the option in View / Options, Document
                tab, is already set so. Is it what we should expect?

                Only after that, I can do the replacement by any means. But it is
                probably a consequence of what I just mentioned.

                For Art, I found out that after having opened such a document, I can
                make a successful search of either \r, either \n, both seem equivalent,
                as if, really, the DOS/Windows format was used internally. I still
                didn't have to write scripts who'd rely on this but the idea of initial
                script of John and of you seems a good precaution, unless we would have
                a way to test the indicated format of a document as NoteTab sees it?

                J.-F.

                Le 27/08/2012 17:47, John Shotsky a écrit :
                > The following clip is embedded in the beginning of any clip library I create.
                > ;Make all CR's the same
                > ^!Replace "\R">> "\r\n" ARSW
                >
                > If you are working with regular text, you probably should set the option to dos/windows too. Mine is always set that
                > way, as I only work with windows text, web pages, etc. You would change it if you needed to save it a different way.
                >
                > Regards,
                > John
                > RecipeTools Web Site:<http://recipetools.gotdns.com/> http://recipetools.gotdns.com/
                >
                > From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Jean-François Colas
                > Sent: Monday, August 27, 2012 08:31
                > To: ntb-clips@yahoogroups.com
                > Subject: [Clip] CR, CRLF, etc
                >
                >
                > Hi everybody,
                >
                > I have to manage some texts whose lines end with the only ascii
                > character 13, without the character 10. NoteTab Light 6.2 recognizes
                > those files as Mac format. To make them more DOS/Windows compliant, it
                > seems I have to do two things:
                > 1) in Document / Properties, set the "Save as" field to DOS/Windows,
                > instead of Original,
                > and then:
                > 2) replace with RegEx, \R by \r\n
                >
                > Here is my double question:
                >
                > Do I really need those two steps?
                > If so, can I achieve that by a script, by any other way than ^!Keyboard?
                >
                > Thanks,
                > J.-F.
                >
                >
                >
                > [Non-text portions of this message have been removed]
                >
                >
                >
                > ------------------------------------
                >
                > Fookes Software: http://www.fookes.com/
                > NoteTab website: http://www.notetab.com/
                > NoteTab Discussion Lists: http://www.notetab.com/groups.php
                >
                > ***
                > Yahoo! Groups Links
                >
                >
                >
              • Axel Berger
                ... No, I just tried. I opened a file in Unix format, saved as over itself and reloaded: I had become DOS/Windows. Possibly it has to be save as, not save.
                Message 7 of 13 , Aug 28, 2012
                • 0 Attachment
                  Jean-François Colas wrote:
                  > It seems I still need setting the save format for any individual
                  > document to "DOS/Windows", though the option in View / Options,
                  > Document tab, is already set so. Is it what we should expect?

                  No, I just tried. I opened a file in Unix format, "saved as" over itself
                  and reloaded: I had become DOS/Windows. Possibly it has to be save as,
                  not save.

                  Axel
                • John Shotsky
                  I have run into this many times, and neither save or save as worked to change the format. I had to instead copy the text, paste into a new document, and THEN
                  Message 8 of 13 , Aug 28, 2012
                  • 0 Attachment
                    I have run into this many times, and neither save or save as worked to change the format. I had to instead copy the
                    text, paste into a new document, and THEN save. At that point, it will save as the format chosen in preferences. This
                    happens fairly often from emails, which have a mixed bag of line endings.

                    Regards,
                    John
                    RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/

                    From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Axel Berger
                    Sent: Tuesday, August 28, 2012 05:43
                    To: ntb-clips@yahoogroups.com
                    Subject: Re: [Clip] CR, CRLF, etc


                    Jean-Fran�ois Colas wrote:
                    > It seems I still need setting the save format for any individual
                    > document to "DOS/Windows", though the option in View / Options,
                    > Document tab, is already set so. Is it what we should expect?

                    No, I just tried. I opened a file in Unix format, "saved as" over itself
                    and reloaded: I had become DOS/Windows. Possibly it has to be save as,
                    not save.

                    Axel



                    [Non-text portions of this message have been removed]
                  • Eric Fookes
                    Hi Jean-François, ... This global option is only used of your current document has the Default Properties value set (see under the Document menu).
                    Message 9 of 13 , Aug 28, 2012
                    • 0 Attachment
                      Hi Jean-François,

                      On 28/08/2012 12:22, Jean-François Colas wrote:
                      > It seems I still need setting the save format for any individual
                      > document to "DOS/Windows", though the option in View / Options, Document
                      > tab, is already set so. Is it what we should expect?

                      This global option is only used of your current document has the
                      "Default Properties" value set (see under the Document menu). Otherwise,
                      you need to open the Document/Properties dialog box and change the "Save
                      As" option from Original to "DOS/Windows" or set "Default Properties"
                      back on.

                      --
                      Regards,

                      Eric Fookes
                      http://www.fookes.com/
                    • John Shotsky
                      I see. Something new for me. I found in the help system that several things cause default properties to be turned off, something as simple as changing the
                      Message 10 of 13 , Aug 28, 2012
                      • 0 Attachment
                        I see. Something new for me. I found in the help system that several things cause 'default properties' to be turned off,
                        something as simple as changing the font. I use a custom font for all my work, so I guess 'default properties' is turned
                        off for all my documents, even though it has a checkmark. Either that, or I don't understand the help wording.

                        Regards,
                        John
                        RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/

                        From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Eric Fookes
                        Sent: Tuesday, August 28, 2012 06:10
                        To: ntb-clips@yahoogroups.com
                        Subject: Re: [Clip] CR, CRLF, etc


                        Hi Jean-Fran�ois,

                        On 28/08/2012 12:22, Jean-Fran�ois Colas wrote:
                        > It seems I still need setting the save format for any individual
                        > document to "DOS/Windows", though the option in View / Options, Document
                        > tab, is already set so. Is it what we should expect?

                        This global option is only used of your current document has the
                        "Default Properties" value set (see under the Document menu). Otherwise,
                        you need to open the Document/Properties dialog box and change the "Save
                        As" option from Original to "DOS/Windows" or set "Default Properties"
                        back on.

                        --
                        Regards,

                        Eric Fookes
                        http://www.fookes.com/



                        [Non-text portions of this message have been removed]
                      • Jean-François Colas
                        Hi Eric & all, ... Oh, I forgot this option... I actually didn t have to pay attentin to it so far. I just solved the problem by activating the clear
                        Message 11 of 13 , Aug 28, 2012
                        • 0 Attachment
                          Hi Eric & all,


                          Le 28/08/2012 15:09, Eric Fookes a écrit :
                          > Hi Jean-François,
                          >
                          > On 28/08/2012 12:22, Jean-François Colas wrote:
                          >> It seems I still need setting the save format for any individual
                          >> document to "DOS/Windows", though the option in View / Options, Document
                          >> tab, is already set so. Is it what we should expect?
                          >
                          > This global option is only used of your current document has the
                          > "Default Properties" value set (see under the Document menu). Otherwise,
                          > you need to open the Document/Properties dialog box and change the "Save
                          > As" option from Original to "DOS/Windows" or set "Default Properties"
                          > back on.
                          >
                          Oh, I forgot this option... I actually didn't have to pay attentin to it
                          so far. I just solved the problem by activating the "clear properties"
                          in the advanced options, and now, everything seems to be... clearer.

                          Regards,
                          J.-F.
                        • Eric Fookes
                          Hi John, ... Your understanding is correct. You can easily clear custom properties by clicking on the Clear Properties button on the Advanced tab of the
                          Message 12 of 13 , Aug 28, 2012
                          • 0 Attachment
                            Hi John,

                            > I see. Something new for me. I found in the help system that several things cause 'default properties' to be turned off,
                            > something as simple as changing the font. I use a custom font for all my work, so I guess 'default properties' is turned
                            > off for all my documents, even though it has a checkmark. Either that, or I don't understand the help wording.

                            Your understanding is correct.

                            You can easily clear "custom" properties by clicking on the "Clear
                            Properties" button on the Advanced tab of the Options dialog box. Note,
                            however, that this won't clear the properties of open documents.

                            --
                            Regards,

                            Eric Fookes
                            http://www.fookes.com/
                          • loro
                            ... Or right-click on the document tab and chose Save Format. Lotta
                            Message 13 of 13 , Aug 30, 2012
                            • 0 Attachment
                              Eric wrote:
                              >Hi Jean-François,
                              >
                              >On 28/08/2012 12:22, Jean-François Colas wrote:
                              > > It seems I still need setting the save format for any individual
                              > > document to "DOS/Windows", though the option in View / Options, Document
                              > > tab, is already set so. Is it what we should expect?
                              >
                              >This global option is only used of your current document has the
                              >"Default Properties" value set (see under the Document menu). Otherwise,
                              >you need to open the Document/Properties dialog box and change the "Save
                              >As" option from Original to "DOS/Windows" or set "Default Properties"
                              >back on.


                              Or right-click on the document tab and chose Save Format.

                              Lotta
                            Your message has been successfully submitted and would be delivered to recipients shortly.