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

Re: [NTS] The ANSI 26 character

Expand Messages
  • 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 1 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 2 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 3 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 4 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 5 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 6 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 7 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 8 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 9 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 10 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 11 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 12 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 13 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.