edits help

Jeff Harrison jeffaharrison at yahoo.com
Thu May 26 11:26:50 PDT 2011


----- Original Message ----

> From: Linda Gray <lc_gray at yahoo.com>
> To: Jay Ashworth <jra at baylink.com>; filepro-list at lists.celestial.com
> Sent: Thu, May 26, 2011 1:13:21 PM
> Subject: Re: edits help
> 
> i'm not worried about the length of the end string.  i need to replace the ' 
> with an html friendly string like the toHTML command does, except it doesn't  
>do 
>
> the single quote.  it was suggested that i do it with an  edit.
> 
> 
> 
> 
> ________________________________
> From: Jay Ashworth  <jra at baylink.com>
> To: filepro-list at lists.celestial.com
> Sent:  Thu, May 26, 2011 11:12:32 AM
> Subject: Re: edits help
> 
> ----- Original  Message -----
> > From: "Linda Gray" <lc_gray at yahoo.com>
> 
> > I need to  convert the ' to ' or %27 using an edit.
> > 
> > I'm not good at  defining edits and sure would appreciate some help.
> > 
> > I need to  replace the ' with it's HTML equivalent before writing out
> > ajax script  that uses ' for strings and have names with ' in them.
> 
> So you need to  URLescape an ASCII string; that's your end goal?
> 
> My snap reaction is "you  don't want to do that with an edit, because you
> can't guarantee how many  characters you'll have to replace, and you'll run
> out of space".  You  *probably* want to write code to do that, as difficult
> as it is to handle  functions in filePro.
> 
> Cheers,
> -- jra
> -- 
> Jay R. Ashworth                   Baylink                      jra at baylink.com
> Designer                     The Things I Think                      RFC 2100
> Ashworth & Associates    http://baylink.pitas.com        2000 Land Rover DII
> St Petersburg FL USA      http://photo.imageinc.us             +1 727 647  
1274


I would suggest that you NOT use an edit for this as well.  I don't think edits 
work very well when you don't know how many of the "from" characters may appear 
in the string.

I would suggest doing this in processing - I think what you want to do is 
replace every occurance of chr("39") with "&#39;" that is the "html equivalent". 
(not url escape - I assume that is not your goal)

Does filepro have a "replace" function?  I don't see one in 5.0 anyway.  Xlate 
seems to work on a character by character basis, so I don't think you can use 
that.  I think you will need to write this using mid and instr.

I suppose Ken will now show us how to do this with an edit. :-)

Jeff Harrison
jeffaharrison at yahoo.com
Author of JHExport and JHImport


More information about the Filepro-list mailing list