l/f problem?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Richard Ragon

    l/f problem?

    I'm a flash applications developer. I'm working with a PHP developer
    who is working on a back end database. His PHP program writes a small
    blob with a sting of comma delineated variables. It looks like this..

    'Air Conditioning,In cluded,Included ,Power
    Steering,Includ ed,Included,Pow er Windows,Include d,Included,Powe r Door
    Locks,Included, Included,Tilt Wheel,Included, Included'

    I suspect there's a problem on how his PHP writes this string, because
    my program (flash windows based) is having a problem trying to read the
    strings last variable "Included".

    I used SQLYOG, a Windows based SQL editor to take a look at the string
    in the blob, and I can see an unidentifiable character at the end of the
    string.. windows can't see it, but it looks like a | at the end of the
    string in the blob db.

    Is this a line return? How do we get rid of this l/f or return from
    showing up via windows?

    What needs to be in the PHP code in order NOT to put a l/f or return here??

    Thanks
    -Richard

  • Andy Hassall

    #2
    Re: l/f problem?

    On Wed, 09 Nov 2005 22:45:54 GMT, Richard Ragon <bsema04@hananh o.com> wrote:
    [color=blue]
    >What needs to be in the PHP code in order NOT to put a l/f or return here??[/color]

    What's at the end of the line in the code that DOES write it?
    --
    Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
    http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

    Comment

    • Frank [GOD]

      #3
      Re: l/f problem?

      have your PHP guy add an extra comma on the end of the string. That will
      remove your l/f and solve your problems!!

      Frank


      Richard Ragon wrote:[color=blue]
      > I'm a flash applications developer. I'm working with a PHP developer
      > who is working on a back end database. His PHP program writes a small
      > blob with a sting of comma delineated variables. It looks like this..
      >
      > 'Air Conditioning,In cluded,Included ,Power
      > Steering,Includ ed,Included,Pow er Windows,Include d,Included,Powe r Door
      > Locks,Included, Included,Tilt Wheel,Included, Included'
      >
      > I suspect there's a problem on how his PHP writes this string, because
      > my program (flash windows based) is having a problem trying to read the
      > strings last variable "Included".
      >
      > I used SQLYOG, a Windows based SQL editor to take a look at the string
      > in the blob, and I can see an unidentifiable character at the end of the
      > string.. windows can't see it, but it looks like a | at the end of the
      > string in the blob db.
      >
      > Is this a line return? How do we get rid of this l/f or return from
      > showing up via windows?
      >
      > What needs to be in the PHP code in order NOT to put a l/f or return here??
      >
      > Thanks
      > -Richard
      >[/color]

      Comment

      • Meião

        #4
        Re: l/f problem?

        Windows and Linux have diferent caracters for Line Feeds and Returns.
        Does your coworker use linux? Maybe that's it.

        You can also try to trim the string.

        André

        Comment

        • Richard Ragon

          #5
          Re: l/f problem?

          Andy Hassall wrote:[color=blue]
          > On Wed, 09 Nov 2005 22:45:54 GMT, Richard Ragon <bsema04@hananh o.com> wrote:
          >
          >[color=green]
          >>What needs to be in the PHP code in order NOT to put a l/f or return here??[/color]
          >
          >
          > What's at the end of the line in the code that DOES write it?[/color]

          Don't know! Windows sees it as a small thin black box.. Looks like a
          character that windows can't understand.

          # == character that windows can't read

          This is what my string looks like to windows

          Variable1,Varia ble2,Variable3#

          -Richard

          Comment

          • Richard Ragon

            #6
            Re: l/f problem?

            Frank [GOD] wrote:
            [color=blue]
            > have your PHP guy add an extra comma on the end of the string. That will
            > remove your l/f and solve your problems!!
            >
            > Frank[/color]

            Doesn't work.. This is what happens..

            # == character windows can't read.

            So, this is what my variable ends up looking like..

            variable1,varia ble2,variable3, variable4,varia ble5#,

            odd huh?
            Thanks
            -Richard

            Comment

            • Richard Ragon

              #7
              Re: l/f problem?

              Meião wrote:
              [color=blue]
              > Windows and Linux have diferent caracters for Line Feeds and Returns.
              > Does your coworker use linux? Maybe that's it.[/color]

              No, but the PHP server is linux. The string is NOT placed by hand.
              [color=blue]
              > You can also try to trim the string.[/color]

              What's a trim? Is it some kind of function?
              [color=blue]
              >
              > André[/color]

              -Richard


              Comment

              • Andy Hassall

                #8
                Re: l/f problem?

                On Thu, 10 Nov 2005 18:13:43 GMT, Richard Ragon <bsema04@hananh o.com> wrote:
                [color=blue]
                >Andy Hassall wrote:[color=green]
                >> On Wed, 09 Nov 2005 22:45:54 GMT, Richard Ragon <bsema04@hananh o.com> wrote:
                >>[color=darkred]
                >>>What needs to be in the PHP code in order NOT to put a l/f or return here??[/color]
                >>
                >> What's at the end of the line in the code that DOES write it?[/color]
                >
                >Don't know! Windows sees it as a small thin black box.. Looks like a
                >character that windows can't understand.[/color]

                No, I mean in the _PHP source code_.
                --
                Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
                http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

                Comment

                • Jeff North

                  #9
                  Re: l/f problem?

                  On Wed, 09 Nov 2005 22:45:54 GMT, in comp.lang.php Richard Ragon
                  <bsema04@hananh o.com> wrote:
                  [color=blue]
                  >| I'm a flash applications developer. I'm working with a PHP developer
                  >| who is working on a back end database. His PHP program writes a small
                  >| blob with a sting of comma delineated variables. It looks like this..
                  >|
                  >| 'Air Conditioning,In cluded,Included ,Power
                  >| Steering,Includ ed,Included,Pow er Windows,Include d,Included,Powe r Door
                  >| Locks,Included, Included,Tilt Wheel,Included, Included'
                  >|
                  >| I suspect there's a problem on how his PHP writes this string, because
                  >| my program (flash windows based) is having a problem trying to read the
                  >| strings last variable "Included".
                  >|
                  >| I used SQLYOG, a Windows based SQL editor to take a look at the string
                  >| in the blob, and I can see an unidentifiable character at the end of the
                  >| string.. windows can't see it, but it looks like a | at the end of the
                  >| string in the blob db.[/color]

                  All this means is that the font you are currently using can not
                  display the character.
                  [color=blue]
                  >| Is this a line return? How do we get rid of this l/f or return from
                  >| showing up via windows?
                  >|
                  >| What needs to be in the PHP code in order NOT to put a l/f or return here??[/color]

                  What version of Flash are you using?

                  Use the following to obtain the code you are looking for (AS2.0 code):
                  ---------------------------------------------------
                  var my_lv:LoadVars = new LoadVars();
                  my_lv.onLoad = function(succes s:Boolean):Void {
                  if (success) {
                  trace(this);
                  } else {
                  trace("Error");
                  }
                  }
                  my_lv.load("lv. txt");
                  -----------------------------------------------------
                  change the "lv.txt" to that of your filename.
                  The output window will show the URL encoded string that is read. If
                  the last character is a linefeed then you'll see %0D as the last
                  character of the output.

                  From there you could expand your if( success ) function to:

                  if( success ) {
                  my_lv = my_lv.substring (0,my_lv.length-1);
                  //--- do more processing
                  }
                  ---------------------------------------------------------------
                  jnorthau@yourpa ntsyahoo.com.au : Remove your pants to reply
                  ---------------------------------------------------------------

                  Comment

                  Working...