I stand half corrected on the CFMX6.1 issue
I stand half corrected on the CFMX6.1 issue, and believe me, nobody is happier about this than I am. We almost had to turn to the dark side there for a few days....
I believe a solution has been found to the problem of CFMX6.1 not understanding some XML UTF-8 feeds (as in not being able to read the encoding of the page to render out the right characters).
To give a little bit of background on this, I have been using the MXNA1.0/Fullasagoog aggregator code (which is in the DRK3) to put a blog aggregator up for the Japanese community on a site I manage/run. Up to this point I sort of let the problem of not being able to read in certain feeds go as for some reason others would get read in. It was odd, but by far not the first and most definitely not the last encoding issue of Japanese characters that we have dealt with. and.. other more important things came up.. (job etc..) and it got shoved to the back.
This month though, we are actually planning a major renewal for the site and I decided to take this chance to go over the CF code once again to get it working.
As I posted in my last post, there was nothing I could do to get the CF page (running on CFMX6.1 or CFMX7, although I did find a weird fix for CFMX7) to read in the "problem" UTF-8 feeds. Some people said there was no need to set anything to UTF-8 as CF supports that by default. Though I have read differently on MM's site. Oh well, that wasn't the problem anyways.
Thanks to Paul (in the comments), a solution has been found it seems (so far it works). Unlike some people who decided that I was wacked out, Paul was nice enough to point me to a blog entry that proved that it is CF that is a little out of wack but there was a solution to be found.
Check this blog entry over on Big Damn Hereos' site.
It turns out that CFMX6 (and 7 believe it or not) cannot support feeds as application/xml, which you will quickly note is not on CFHTTP's internal list of automatically stringified types.
Although it is noted in that blog entry that there could be a fix in the future for that.
So.. it wasn't an issue of not supporting UTF-8 it was an issue of not support application/xml in CFHTTP. This is an extremely interesting find I think. I wish that MM had made this a bit more open in a technote or something.
Well, the code that I have used up until now is now working perfectly (so far) which means we don't have to migrate to ASP.NET!!! Whew... not the direction I was looking forward to going, but when you gotta make something work, you gotta make something work.
I'm so glad that somebody else was willing to post how much trouble they went through to get the problem fixed which means happy times for people like me, stumped and dejected because no other "normal" way was working.
In conclusion, I have come to the understanding overall that I stand half corrected on this issue. Whereas CFMX does support utf-8 fully, it didn't support an important piece of the puzzle whereas so many others do. If only I had the tenacity to track down the problem as Roger Benningfield did.
I'm just glad there is a happy ending to this problem :) and to top it all off, no need to upgrade yet.
Posted by Graeme at June 14, 2005 03:52 PM