Uploaded image for project: 'Railo'
  1. Railo
  2. RAILO-814

CFHTTP returns garbled chars from UTF-8 XML feed

    Details

    • Steps to Reproduce:
      Hide

      <cfhttp url="http://gdata.youtube.com/feeds/api/videos/H9JZsaAEcUU" method="get" charset="utf-8" result="tube">
      <cffile action="write" file="#application.imagepath#\tube.txt" charset="utf-8" output="#tube.filecontent#">
      <cffile action="read" file="#application.imagepath#\tube.txt" charset="utf-8" variable="textfile">

      <cfoutput>
      <p>Original CFHTTP output: #tube.filecontent#</p>
      <p>Textfile output: #textfile#</p>
      </cfoutput>

      Show
      <cfhttp url="http://gdata.youtube.com/feeds/api/videos/H9JZsaAEcUU" method="get" charset="utf-8" result="tube"> <cffile action="write" file="#application.imagepath#\tube.txt" charset="utf-8" output="#tube.filecontent#"> <cffile action="read" file="#application.imagepath#\tube.txt" charset="utf-8" variable="textfile"> <cfoutput> <p>Original CFHTTP output: #tube.filecontent#</p> <p>Textfile output: #textfile#</p> </cfoutput>

      Description

      When retrieving an UTF-8 encoded Atom XML feed (in this case from YouTube) through CFHTTP, special chars like á or ü are displayed á resp. ü etc.

      However, writing the CFHTTP.filecontent to a file and displaying that file will return the correct chars (see Steps to Reproduce).

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                micstriit Michael Offner
                Reporter:
                lesener Lutz Lesener
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: