Josh Nathanson wrote: > 3) If I did the rereplace on the way into the db, it still may not catch all > offending control characters. There may be a new one that isn't in the > regex yet. Additionally, I don't want to disrupt the shopper's checkout > process if at all possible.
there can't be. the control chars are a fixed, known quantity. not a cf regex expert but w/a java Pattern you can pull out {Cntrl} for US-ASCII or better yet use the unicode control char block (Cc) which goes a bit deeper: '\u0000' through '\u0008' '\u000E' through '\u001B' '\u007F' through '\u009F' you could also test whether the char is "ignorable". have a look at the java docs for Character & Character.UnicodeBlock. > 5) So, I may as well just do it on the way out of the db, where I don't have > to worry about disrupting a shopper when they are about to buy something > (can you imagine the error message: "Sorry, we have detected an invisible > character in your address. Please remove it and re-submit.") why do it that way? why not just remove the chars silently? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259563 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4