1. <cfif REFindNoCase (
  2. '^<\?xml[^?] encoding="([^"] )"[^?]*\?>',
  3. trim ( cfhttp.fileContent ) ) gt 0
  4. >
  5. <cfset charset = REReplaceNoCase (
  6. trim ( cfhttp.fileContent ),
  7. '^<\?xml[^?] encoding="([^"] )"[^?]*\?>.*',
  8. '\1'
  9. />
  10. </cfif>