• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Unexpected behavior in xmlparse, work-around found

New Here ,
Jan 27, 2014 Jan 27, 2014

Copy link to clipboard

Copied

If you read an XML file from another site like this:

<cfset myDoc=XMLParse("http://72.250.245.94/videoshare")>

<cfdump var = "#myDoc#">

the UTF-8 coding won't be handled correctly, and you will have unexpected characters when you display the XML data.

If you read the XML file like this:

<cfhttp

    url = "http://72.250.245.94/videoshare"

    charset = "UTF-8"

    result = "rawdoc">

   

<cfset myDoc=XMLParse(#rawDoc.filecontent#)>

<cfdump var = "#myDoc#">

The data will display as expected.

Views

286

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation