Connecting Tech Pros Worldwide Help | Site Map

l/f problem?

  #1  
Old November 9th, 2005, 10:55 PM
Richard Ragon
Guest
 
Posts: n/a
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 10th, 2005, 12:35 AM
Andy Hassall
Guest
 
Posts: n/a

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, 03:25 AM
Frank [GOD]
Guest
 
Posts: n/a

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, 10:25 AM
Meião
Guest
 
Posts: n/a

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, 06:25 PM
Richard Ragon
Guest
 
Posts: n/a

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, 06:25 PM
Richard Ragon
Guest
 
Posts: n/a

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, 06:25 PM
Richard Ragon
Guest
 
Posts: n/a

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, 06:35 PM
Andy Hassall
Guest
 
Posts: n/a

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, 11:45 PM
Jeff North
Guest
 
Posts: n/a

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
---------------------------------------------------------------
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determining Dropdown Value Problem Mike Collins answers 2 January 24th, 2006 06:25 PM
SP1 Problem SOAPException doesn't return quote and Umlaute correcty Dany answers 16 November 23rd, 2005 05:16 AM
Problem: Request time out Ammar answers 6 November 19th, 2005 05:20 AM
Problem with virtual method Jon Davis answers 28 November 15th, 2005 06:19 AM
Solution to the halting Problem? Peter Olcott answers 117 July 22nd, 2005 06:46 PM