|
Prev: session variable
Next: Using cftransaction in a cfc
From: BKBK on 19 Apr 2008 04:06 The REREplaceNoCase line in my code removes the BOM as well, so it may seem like a duplication, coming after PaulH's code. There was a delay in the post from the newsgroup. When I composed my last post, PaulH's post of 04/17/2008 06:40:57 AM wasn't yet in the forum. PaulH wrote: [i]after reading some W3C stuff on xml & BOMs i'm thinking that maybe xmlParse() should actually handle this.[/i] Difficult. BOM is related to unicode, but xmlParse doesn't have any attribute that relates to encoding.
From: PaulH **AdobeCommunityExpert** on 19 Apr 2008 05:03
BKBK wrote: > Difficult. BOM is related to unicode, but xmlParse doesn't have any attribute > that relates to encoding. no not difficult and nothing to do w/the developer knowing the encoding beforehand. if there's a BOM & the *xml* is declaring itself to be utf-8 encoded, the parser can toss the BOM, it has no relevance for parsing the xml (only if the encoding is utf-16 or i guess utf-32 is the BOM really relevant). if there's no xml encoding declaration then the parser would have to look at & use the BOM to see the encoding & which "endiness" to use. if the parser can't handle BOMs (as far as i can tell from the W3C WG it's supposed) then any valid utf-16, etc encoded xml docs will also bomb--the BOM is *required* for those. |