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

Re: [NTS] The ANSI 26 character

Expand Messages
  • acummingsus
    ... [ . . ] ... by the path it appears you are running it in a way other than what i am. generally i run it (from within a clip library) like the perl script
    Message 1 of 25 , Dec 21, 2003
    • 0 Attachment
      On Sun, 21 Dec 2003 11:17:09 -0000, Sheri wrote:
      > Hi Alan,
      >
      [ . . ]

      >> Haven't a clue why they'd run on yours and not mine. Oh, they run
      > here -- but they just empty the doc.
      >>
      >
      > That sounds really strange Alan, unless you had a missing semicolon
      > or something. I just cut and pasted from my prior email to a new
      > notetab file and ran your
      > 111
      > 444
      > 222
      >
      > (incl new line after the 222)
      > and the output is shown after the end of this message.
      >
      > Is the StdError.err have a clue or is it missing as well? The posted
      > script of mine that included use strict and use warnings does give a
      > warning in Stderror.err for me, looks like this:
      >
      > Argument "" isn't numeric in addition (+) at D:\PROGRA~1\NOTETA~2
      > \Scripts\figures3.pl line 31, <> line 4.

      by the path it appears you are running it in a way other than what i
      am.

      generally i run it (from within a clip library) like the perl script
      in samplecode library does.

      if ($] > 5.006) {

      that's line 7

      Unrecognized character \xA0 at D:\DOCUME~1\fb11_s\LOCALS~1
      \Temp\efo2.tmp line 7.

      and that's a stderror.err but I don't know if it's for this or a
      different script that i had run. that stderr file self deleted
      somehow and right now i cannot get your script to produce a stderr
      file

      inconsistencies at this time surrounding the stderr file. and i
      didn't delete it using clipcode or by any other means. i thought it
      normally just stayed there on disk until i delete it. but not so,
      not at this time here.

      no semi colons missing

      ;^!RunPerl C:\files\docs\addcol.pl
      ^!RunPerl pl_tst

      either of those 2 ways i ran it did same as i reported via former
      post, strips doc

      using box char i haven't had a problem with misinterpretation as "end
      of doc"

      my substitution using escaped box char been working fine here

      i suspect perhaps it has more to do with it is perl ie the perl
      interpreter is the running app or process that is scanning the doc
      using a regex to do so. and, escaped reverts the item from a control
      character to literal. IOW the escaspe tells perl to look for a
      literal box char, not a box char that is a control character.

      I'm not trying to devalue your achievement, not at all, not in any
      way. I do value your contributions and achievements. Your method
      likely is a more formal and informed approach whereas I just
      mechanically experimented until something worked for me. I'm only
      sharing what occurs to me on the matter (that 1 and 1/2 cent thing)
      as well as what happens here.

      Still a mystery to me why yours acts the way it does here.

      --
      Alan.
    • Sheri
      Hi Alan, The StdError.err file gets deleted when you start running a Perl script. So if you have it loaded in a document buffer, you have to reload it to see
      Message 2 of 25 , Dec 21, 2003
      • 0 Attachment
        Hi Alan,

        The StdError.err file gets deleted when you start running a Perl script. So if you have it loaded in a document buffer, you have to reload it to see if the current run left any messages.

        The fact that it didn't leave the compile messages makes me think that it didn't run the script, didn't even get to the point of compiling it. It is hard to imagine that it has anything to do with Windows 2000, because I just rebooted my old Windows 98 and tried my code under both Perl 5.6.x and Perl 5.8.0 Build 805. Also tried it substituting escaped box character copied and pasted from an output. All ran fine. All gave the same warning message previously posted. When I used the box character I got two such warning messages and one of them said that "^Z" was not numeric within the line range two. Said it just like that "^Z" in quotes and everything.

        In addition, I ran them as you say you usually do, from inside a clip doc. All variations worked there too. I'm using NTP 4.95 and you probably are as well.

        I really doubt that its Windows 2000, but I guess unless someone else has it and can test, we may never know <g>. I doubt it is that particular build of Perl, since my (even earlier) one runs it under Windows 98.

        I have from time to time had clip documents go bad, with too many or not enough new lines or spaces after the clip header or at the bottom of the document. And the only clue was something was wrong was that sometimes clips I knew should work, didn't. Scared me into thinking I might have a virus once! But since it also doesn't work when running from a .Pl file, that's unlikely (unless the notetab clip that launches ^!runperl is in a bum clip doc).

        Tis a mystery. I would never have thought you were knocking my solution so no need to have said that.

        Sheri
      • Alan C.
        ... Hi, Got it running here! Notice next my get_around (for some unknown to me reason, my puter didn t like your line with 5.006 in it). It appears i guess
        Message 3 of 25 , Dec 21, 2003
        • 0 Attachment
          On Sun, 21 Dec 2003 18:17:30 -0500, Sheri wrote:
          > Hi Alan,
          Hi,

          Got it running here! Notice next my get_around (for some unknown to me reason, my 'puter didn't like your line with 5.006 in it). It appears i guess that's your version check. Runs fine with that bypassed like next.

          my $count = 0;
          my $total = 0;
          my $tst = 'affirm';
          @in = <>;
          #if ($] >�5.006) {
          if ($tst eq 'affirm') {
          $badchar = chr(26);

          i went to trying it in a different text editor, not Notetab. before i disconnected that mentioned line, here's the error i consistently got:

          Unrecognized character \xA0 at c:\files\docs\addcol.pl line 8.

          line 8 being that line above that i spoke of. with the get_around in vogue, no error, runs fine.

          BTW this other editor does not induce the box char into. thus is no need to rid it of something that does not get into in the first place. And the error ouput has greater consistency.

          i tinkered with the while but found nothing as far as the \n's go.

          Perl has so much depth, I dunno if I'll ever learn it. but i'm not a giver upper. tortoise sometimes can win 'specially if the Wabbit gets careless!

          --
          Alan.
        • Sheri
          Hi Alan, Do you have nonprinting characters showing in your NTP? I m thinking maybe something that looks like a space but isn t one got into your script either
          Message 4 of 25 , Dec 22, 2003
          • 0 Attachment
            Hi Alan,

            Do you have nonprinting characters showing in your NTP? I'm thinking
            maybe something that looks like a space but isn't one got into your
            script either on or near that line?

            Try this script:

            print "Current Perl Version is ", $], "\n";
            if ($] > 5.006) {
            print "it's greater than 5.006\n";
            }
            else {
            print "it wasn't greater than 5.006";
            }
            #end
            #

            Remember that the document displayed in notetab when launched can't
            be an empty doc

            Sheri
          • acummingsus
            ... There are no spaces. Ntab matters spaces, Perl doesn t, Perl could care less. The two if lines with 5.006 match. print Current Perl Version is , $],
            Message 5 of 25 , Dec 22, 2003
            • 0 Attachment
              --- In ntb-scripts@yahoogroups.com, "Sheri" <silvermoonwoman@c...>
              wrote:
              > Hi Alan,

              There are no spaces. Ntab matters spaces, Perl doesn't, Perl could
              care less.

              The two if lines with 5.006 match.

              print "Current Perl Version is ", $], "\n";
              if ($] > 5.006) {
              print "it's greater than 5.006\n";
              }
              else {
              print "it wasn't greater than 5.006";
              }

              the above works. the next works until the line with 5.006 gets
              activated then it runs but strips doc so doc is empty. At this point
              I'm going to assume it has to do with the context of nearby stuff
              such as the input operator into array @in or etc. since nearby stuff
              is the only difference that exists between these two scripts herein.
              the two use lines on or off doesn't make any difference in the
              result. And I've now 5.8.2 build 807 or whatever the latest is and
              that also makes no difference (previously had 5.8.0 something ver.)

              #!/perl/bin/perl -w
              #use strict;
              #use warnings;
              my (@in, $badchar, $item);
              my $count = 0;
              my $total = 0;
              my $tst = 'affirm';
              @in = <>;
              #if ($] > 5.006) {
              if ($tst eq 'affirm') {
              $badchar = chr(26);
              $count = @in;
              $in[$count - 1] =~ s/($badchar)$//;
              }

              print "This way (using while) needs new lines\n";
              print "(not sure why\? could just add \\n's)\n";

              while (<@in>) {
              $item = $_;
              print $item;
              $total = $total + $_;
              }
              print "--------\n";
              print $total;
              print "\n-----------\n";

              $total = 0;

              print "This way (using foreach) doesn't need new lines\n";
              foreach (@in) {
              $item = $_;
              print $item;
              $total = $total + $_;
              }
              print "--------\n";
              print $total;
              print "\n-----------\n";
              #end
            • Sheri
              Hi Alan, Last try -- I posted a test clb library file with two clips in it that work fine for me. http://tinyurl.com/36lnb If they work, it must be something
              Message 6 of 25 , Dec 23, 2003
              • 0 Attachment
                Hi Alan,

                Last try -- I posted a test clb library file with two clips in it
                that work fine for me.

                http://tinyurl.com/36lnb

                If they work, it must be something about your files. I have no idea
                what <g>

                Regards,
                Sheri
              • Piotr Bieńkowski
                W dniu Tue, 23 Dec 2003 11:49:28 -0000 ... Hi Sheri, I started this thread :) , so here s my bit: I tested both clips and this is what I get from Perl figures
                Message 7 of 25 , Dec 23, 2003
                • 0 Attachment
                  W dniu Tue, 23 Dec 2003 11:49:28 -0000
                  "Sheri" <silvermoonwoman@...> napisal(a):

                  > Hi Alan,
                  >
                  > Last try -- I posted a test clb library file with two clips in it
                  > that work fine for me.
                  >
                  > http://tinyurl.com/36lnb
                  >
                  > If they work, it must be something about your files. I have no idea
                  > what <g>
                  >
                  > Regards,
                  > Sheri


                  Hi Sheri,

                  I started this thread :) , so here's my bit:

                  I tested both clips and this is what I get from Perl figures 1

                  Current Perl Version is 5.008002
                  it's greater than 5.006

                  This way (using while) needs new lines
                  (not sure why? could just add \n's)
                  102030--------
                  60
                  -----------
                  This way (using foreach) doesn't need new lines
                  10
                  20
                  30
                  --------
                  60
                  -----------


                  And here's what i get from Perl figures 2


                  this was the original script from http://groups.yahoo.com/group/ntb-scripts/message/252

                  10
                  20
                  30
                  --------
                  60

                  Regards,

                  Piotr
                • Sheri
                  ... wrote: Hi Piotr! Yes, yours works fine Are you also on the clips list? I posted a new clip/script package for Notetab document history that uses Perl.
                  Message 8 of 25 , Dec 23, 2003
                  • 0 Attachment
                    --- In ntb-scripts@yahoogroups.com, Piotr Bieñkowski <syntax@n...>
                    wrote:

                    Hi Piotr! Yes, yours works fine <g>

                    Are you also on the clips list? I posted a new clip/script package
                    for Notetab document history that uses Perl. Give it a whirl when
                    you get a chance. In that package I circumvent the box character
                    after the fact in Notetab clips. Such as I have Perl sorting and
                    printing back to Notetab, the box character ends up as the first
                    character in the document.

                    ^!If ^$ChartoDec(^$StrIndex("^$GetText$";1)$)$=26 Next Else Skip_1
                    ^!InsertText ^$StrDeleteLeft("^$GetText$";1)$

                    http://groups.yahoo.com/group/ntb-clips/message/11396

                    Regards,
                    Sheri
                  • Piotr Bieńkowski
                    W dniu Tue, 23 Dec 2003 13:59:45 -0000 ... Yes, I thinnk I m on almost all Notetab-related lists, maybe with the exception of the basic list and next-release
                    Message 9 of 25 , Dec 23, 2003
                    • 0 Attachment
                      W dniu Tue, 23 Dec 2003 13:59:45 -0000
                      "Sheri" <silvermoonwoman@...> napisal(a):

                      > Hi Piotr! Yes, yours works fine <g>
                      >
                      > Are you also on the clips list?

                      Yes, I thinnk I'm on almost all Notetab-related lists, maybe with the exception of the basic list and next-release list.

                      Piotr
                    • Alan C.
                      ... Your url doesn t work for me at this time. I ve already ruled out the files. Obviously works on Win XP. But Win 2k with some differences. I think it has
                      Message 10 of 25 , Dec 23, 2003
                      • 0 Attachment
                        On Tue, 23 Dec 2003 11:49:28 -0000, Sheri wrote:
                        > Hi Alan,
                        >
                        > Last try -- I posted a test clb library file with two clips in it
                        > that work fine for me.
                        >
                        http://tinyurl.com/36lnb
                        >
                        > If they work, it must be something about your files. I have no idea
                        > what <g>

                        Your url doesn't work for me at this time.

                        I've already ruled out the files. Obviously works on Win XP. But Win 2k with some differences.

                        I think it has to do with that mscvrt.dll file that Perl uses on Win 32. The dll on this Win 2k SP4 is bound to be different than XP's

                        --
                        Alan.
                      • Sheri
                        ... Try it this way: http://groups.yahoo.com/group/ntb-scripts/files/4_Alan.zip ... I am still not convinced. Perl is supposed to be cross platform. We are
                        Message 11 of 25 , Dec 23, 2003
                        • 0 Attachment
                          --- In ntb-scripts@yahoogroups.com, "Alan C." <acumming@c...> wrote:
                          > On Tue, 23 Dec 2003 11:49:28 -0000, Sheri wrote:
                          > Your url doesn't work for me at this time.

                          Try it this way:

                          http://groups.yahoo.com/group/ntb-scripts/files/4_Alan.zip

                          >
                          > I've already ruled out the files. Obviously works on Win XP. But
                          > Win 2k with some differences.

                          I am still not convinced. Perl is supposed to be cross platform. We
                          are running the same build of Perl under similar platforms.
                          Meanwhile don't forget that it also works on 98.

                          My Win98 MSVCRT.DLL is version 6.1.8924.0
                          In XP it is version is version 7.0.2600.1106

                          The only relevant thing I found searching google for msvcrt.dll and
                          Perl 5.8 was that if you have Windows 95 you have to download it
                          from ftp://ftp.microsoft.com/softlib/mslfiles/msvcrt.exe, otherwise
                          it come with Windows. I noticed that some of my software has private
                          copies of various versions of msvcrt.exe.

                          I also spotted a warning against installing 5.8 over top of 5.6 and
                          some suggestion that you shouldn't have both versions installed. I
                          installed 5.6, renamed its folder, then installed 5.8. I just rename
                          the folders when I want to use one or the other. The live one needs
                          to be in C:\Perl\bin. That worked fine on Windows 98. But having so
                          recently installed, I've really only been using 5.8 so far under XP.
                          I haven't tried to install any ppm packages yet.

                          Sheri
                        • Alan C.
                          Hi Sheri, maybe we ll find out something yet . . . The next zip file has 4_Alan.clb inside the zip file with an added clip.
                          Message 12 of 25 , Dec 23, 2003
                          • 0 Attachment
                            Hi Sheri,

                            maybe we'll find out something yet . . .

                            The next zip file has 4_Alan.clb inside the zip file with an added clip.

                            http://groups.yahoo.com/group/ntb-scripts/files/

                            4_Sheri.zip Your clb now has 3 clips in it. the first two work, the # 3 does not it strips doc.

                            It is the # 3 that was working for you but not for me.

                            The # 3 still does not work for me.

                            If the # 3 works for you then there is something different between your 'puter and mine because that one does not work here.

                            I'd read about the installations, thus I had uninstalled 5.8.0 before I installed 5.8.2

                            also I restored a previous Ghost image with no Perl at all installed. On the sys with no Perl on it, I installed the Perl 5.8.2 and i get the exact same result, # 3 clip does not work here.

                            --
                            Alan.

                            On Wed, 24 Dec 2003 01:19:39 -0000, Sheri wrote:
                            > --- In ntb-scripts@yahoogroups.com, "Alan C." <acumming@c...> wrote:
                            >> On Tue, 23 Dec 2003 11:49:28 -0000, Sheri wrote:
                            >> Your url doesn't work for me at this time.
                            >
                            > Try it this way:
                            >
                            http://groups.yahoo.com/group/ntb-scripts/files/4_Alan.zip
                            >
                            >>
                            >> I've already ruled out the files.  Obviously works on Win XP.  But
                            >> Win 2k with some differences.
                            >
                            > I am still not convinced. Perl is supposed to be cross platform. We
                            > are running the same build of Perl under similar platforms.
                            > Meanwhile don't forget that it also works on 98.
                            >
                            > My Win98 MSVCRT.DLL is version 6.1.8924.0
                            > In XP it is version is version 7.0.2600.1106
                            >
                            > The only relevant thing I found searching google for msvcrt.dll and
                            > Perl 5.8 was that if you have Windows 95 you have to download it
                            > from ftp://ftp.microsoft.com/softlib/mslfiles/msvcrt.exe, otherwise
                            > it come with Windows. I noticed that some of my software has private
                            > copies of various versions of msvcrt.exe.
                            >
                            > I also spotted a warning against installing 5.8 over top of 5.6 and
                            > some suggestion that you shouldn't have both versions installed. I
                            > installed 5.6, renamed its folder, then installed 5.8. I just rename
                            > the folders when I want to use one or the other. The live one needs
                            > to be in C:\Perl\bin. That worked fine on Windows 98. But having so
                            > recently installed, I've really only been using 5.8 so far under XP.
                            > I haven't tried to install any ppm packages yet.
                            >
                            > Sheri
                          • Sheri
                            Well, guess what? Nbr 3 doesn t work here either! Haven t studied it yet, no obvious explanation, but if I discover something I ll let you know. Sheri
                            Message 13 of 25 , Dec 23, 2003
                            • 0 Attachment
                              Well, guess what?

                              Nbr 3 doesn't work here either!

                              Haven't studied it yet, no obvious explanation, but if I discover
                              something I'll let you know.

                              Sheri
                            • Sheri
                              Got it! Your version has a non-breaking space (character 160) in front of 5.006. I m guessing that your Yahoo option is to display messages as HTML and somehow
                              Message 14 of 25 , Dec 23, 2003
                              • 0 Attachment
                                Got it!

                                Your version has a non-breaking space (character 160) in front of
                                5.006.

                                I'm guessing that your Yahoo option is to display messages as HTML
                                and somehow the conversion did that. I have mine set to plain text.
                                Either that or your email program did it, depending on where you
                                copied the script to your clipboard for pasting to NoteTab in the
                                first place.

                                Its easy to miss even with NoteTab displaying non-printing
                                characters. You'll notice now that that particular space doesn't
                                have a little dot in it. :)

                                Change it to a real space and it will work.

                                Sheri
                              • Alan C.
                                ... Sure enough. It had a space appearing space but upon closer examination the dot wasn t there with the non-printing turned on. View source on a text file
                                Message 15 of 25 , Dec 23, 2003
                                • 0 Attachment
                                  On Wed, 24 Dec 2003 02:38:00 -0000, Sheri wrote:
                                  > Got it!
                                  >
                                  > Your version has a non-breaking space (character 160) in front of
                                  > 5.006.

                                  Sure enough. It had a space appearing space but upon closer examination the dot wasn't there with the non-printing turned on.

                                  View source on a text file for ease of turning that one up. (hehe).

                                  That why I began to think it elsewhere, not the file. I went over and over that file.

                                  But you found it.

                                  Solved.

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