On 11/7/06, Josh Nathanson <[EMAIL PROTECTED]> wrote: > > Maybe I can summarize: > 1) CDATA is not helpful when encountering control characters.
True. Does lead you to wonder, though, how they're sneaking in there. Folks don't just type in null characters... > 2) Thus, I have to use rereplace with all the known control characters that > have broken the xml in the past (CF tells you which character that is the > problem, in Unicode) I still think there's a better way. This is painting with a pretty broad brush, but this regex will simply remove all characters that are not in the ASCII range: REReplace ( mystring, '[^\x00-\x7f]', '', 'ALL' ) Again, it's a pretty broad brush, but it shouldn't be too hard to narrow the focus to all non-printing characters. And it's at least a little more scalable. > 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. The regex above may help prevent you from having to add more on a one-off basis. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:259557 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4