Re: XML and unicode: 0x1a

2012-03-01 Thread Ken Hammond

I don't want to sound stupid but how does regex work?  I could use something 
similar to this and always fall flat on my face every time someone mentions 
regex… 

Ken Hammond

IT Director
The Salem Group
Phone: 630-873-3018
Fax: 630-932-7010
Email: khamm...@saleminc.com

www.saleminc.com




On Feb 23, 2012, at 1:04 PM, Leigh wrote:

 
 Have you tried a regex replace of \x1a ? It *might* work. Worth a shot 
 anyway.
 
  
 -Leigh
 
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350187
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


XML and unicode: 0x1a

2012-02-23 Thread Les Irvin

Apparently, after a billion hours of trying to figure out why I
couldn't successfully output some xml data, it seems that the
unicode: 0x1a character is contained in a text string and making it
fail.

#xmlformat(thestring)# does not successfully strip it from the string.

How can I get rid of that character?  Must be some sort of
replace(thestring,'0x1a','','all') thing but i can't figure out how to
reference it.

Thanks in advance for any help,
Les

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350072
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: XML and unicode: 0x1a

2012-02-23 Thread Leigh

Have you tried a regex replace of \x1a ? It *might* work. Worth a shot anyway.

 
-Leigh

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350079
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: XML and unicode: 0x1a

2012-02-23 Thread Paul Hastings

On 2/24/2012 2:04 AM, Leigh wrote:

 Have you tried a regex replace of \x1a ? It *might* work. Worth a shot 
 anyway.

and there are several other codepoints that are illegal in XML. probably should 
sweep them all away. these are supposed to be a-ok for XML:

#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x1-#x10]
/* any Unicode character, excluding the surrogate blocks, FFFE, and . */

http://www.w3.org/TR/REC-xml/#charsets

so maybe this (probably wrong, regex isn't my strong suit):

[^\x09\x0A\x0D\x20-\xD7FF\xE000-\xFFFD\x1-x10]


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1913 / Virus Database: 2114/4827 - Release Date: 02/23/12



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350085
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm