Small update to this thread, for the benefit of anyone in the future who
might have issues with it and finds this  in a google search.

My users noticed this morning that £ symbols were being converted to �

I'm not entirely sure what caused it but guessed correctly that it was
something to do with the encoding, probably on my Windows 2008 server
and/or IIS 7. The solution was to update the code I used to read and write
the feeds thusly:

<cfhttp url="#getFeeds.feedurl#" charset="utf-8">
<cfset xml = cfhttp.fileContent>
<cfset xml = rereplace(xml, "<!-- .*? -->", "")>
<cfset fileWrite("ram://feed#feedID#.xml", xml, "utf-8")>

with the "utf-8" hardcoded in the cfhttp and fileWrite() code I'm now
seeing my £ symbols again.

I haven't tested this exhaustively but so far it seems to work nicely.


On 6 August 2013 13:11, Edward Chanter <[email protected]> wrote:

> As I said, your solution seems to work perfectly for all the feeds that
> were causing problems. Some have comments at the top, some at the bottom.
> In one case I couldn't see any comments at all but it seems to work anyway.
>
> I will post a bug report about this as suggested, it seems to me like
> CFFeed could just strip out any comments before parsing the feed.
>
> Thanks again for your help with this.
>
>
> On 6 August 2013 13:05, Raymond Camden <[email protected]> wrote:
>
>>
>> What's fascinating is that as far as I can see, the second URL doesn't
>> have
>> a comment. Just saving it locally works. I bet the same works for the
>> first
>> URL too. To be clear, I was able to parse the XML just fine with cfhttp,
>> so
>> it is valid XML. If you want to work with that and not the cffeed result,
>> you can skip the file save.
>>
>>
>> On Tue, Aug 6, 2013 at 7:02 AM, Raymond Camden <[email protected]
>> >wrote:
>>
>> > You may want to file a bug report for this too. Although the first feed
>> > URL fails to validate here http://validator.w3.org/feed/.
>> >
>> >
>> > On Tue, Aug 6, 2013 at 6:59 AM, Raymond Camden <[email protected]
>> >wrote:
>> >
>> >> Another option is to remove the comment from the source XML.
>> >> Unfortunately, cffeed doesn't let you source via a string, so you have
>> to
>> >> save it still.
>> >>
>> >> <cfset u = "
>> >> http://www.computerweekly.com/rss/All-Computer-Weekly-content.xml";>
>> >>
>> >>
>>
>>
>> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:356415
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to