removing special characters through edit type?

Kenneth Brody kenbrody at spamcop.net
Wed Aug 20 12:43:47 PDT 2014


On 8/20/2014 3:26 PM, James Flanagan wrote:
> FreeBSD 9.x
> Filepro 5.7.0.4
>
> I imagine that this question has probably been asked and answered many
> times over the years, but I do not recall seeing it since i joined the
> conversation.
>
> is there a reasonable method to use an edit type to remove special
> characters ( such as single quote, forward slash and space) from a field?
> I know I could do this through processing, but I am looking for a blanket
> approach to removing these from entry fields like LAST NANE.  The code
> creates a file system folder for that name (and it fails when you have a
> last name with a character like a single quote).
>
> If not, what is considered the best approach to dealing with these
> characters (at the system level, as opposed to processing within a single
> file)?

Well, if it's just those 3 characters:

     { !"'"! | !"/"! | !" "! | * }

(Note that you can't remove a double-quote with this.)

You can also use XLATE() in processing to remove any characters you don't 
want, such as:

     result = xlate(name,"'/ ","")

You say that you can't create a folder with "a character like a single 
quote".  FreeBSD will allow any character, aside from forward-slash and nul 
(ascii 0) in a filename, so perhaps it's your code that creates it that's at 
fault?  (Though perhaps it might be "better" in the long run to not have 
such characters in the filename?)

-- 
Kenneth Brody


More information about the Filepro-list mailing list