Connecting Tech Pros Worldwide Help | Site Map

l/f problem?

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 9th, 2005, 09:55 PM
Richard Ragon
Guest
 
Posts: n/a
Default 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,Included,Included,Power
Steering,Included,Included,Power Windows,Included,Included,Power 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


  #2  
Old November 9th, 2005, 11:35 PM
Andy Hassall
Guest
 
Posts: n/a
Default Re: l/f problem?

On Wed, 09 Nov 2005 22:45:54 GMT, Richard Ragon <bsema04@hananho.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.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
  #3  
Old November 10th, 2005, 02:25 AM
Frank [GOD]
Guest
 
Posts: n/a
Default 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,Included,Included,Power
> Steering,Included,Included,Power Windows,Included,Included,Power 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]
  #4  
Old November 10th, 2005, 09:25 AM
Meião
Guest
 
Posts: n/a
Default 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é

  #5  
Old November 10th, 2005, 05:25 PM
Richard Ragon
Guest
 
Posts: n/a
Default Re: l/f problem?

Andy Hassall wrote:[color=blue]
> On Wed, 09 Nov 2005 22:45:54 GMT, Richard Ragon <bsema04@hananho.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,Variable2,Variable3#

-Richard
  #6  
Old November 10th, 2005, 05:25 PM
Richard Ragon
Guest
 
Posts: n/a
Default 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,variable2,variable3,variable4,variable5# ,

odd huh?
Thanks
-Richard
  #7  
Old November 10th, 2005, 05:25 PM
Richard Ragon
Guest
 
Posts: n/a
Default 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


  #8  
Old November 10th, 2005, 05:35 PM
Andy Hassall
Guest
 
Posts: n/a
Default Re: l/f problem?

On Thu, 10 Nov 2005 18:13:43 GMT, Richard Ragon <bsema04@hananho.com> wrote:
[color=blue]
>Andy Hassall wrote:[color=green]
>> On Wed, 09 Nov 2005 22:45:54 GMT, Richard Ragon <bsema04@hananho.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.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
  #9  
Old November 10th, 2005, 10:45 PM
Jeff North
Guest
 
Posts: n/a
Default Re: l/f problem?

On Wed, 09 Nov 2005 22:45:54 GMT, in comp.lang.php Richard Ragon
<bsema04@hananho.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,Included,Included,Power
>| Steering,Included,Included,Power Windows,Included,Included,Power 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(success: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@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.