(ot) jQuery and char sets
I have a jquery.getJSON() call that is failing to call the result handler when the JSON dataset being returned contains an ASCII 132 character (an e with a backtick above it) ... in this case, it's part of someones last name. It's not generating any kind of javascript error either.. the json data is being returned, jquery just either isn't dealing with it or is failing silently (as jquery is known to do) What should I do here? Rick ~| 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:339974 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: (ot) jQuery and char sets
On Fri, Dec 10, 2010 at 10:23 AM, Rick Root rick.r...@gmail.com wrote: I have a jquery.getJSON() call that is failing to call the result handler when the JSON dataset being returned contains an ASCII 132 character (an e with a backtick above it) ... in this case, it's part of someones last name. It's not generating any kind of javascript error either.. the json data is being returned, jquery just either isn't dealing with it or is failing silently (as jquery is known to do) What should I do here? Well Rick, that's easy.. just set your content type you're returning like this! cfcontent reset=Yes type=application/json; charset=utf-8 You sound very smart, why didn't you just google this first? Rick ~| 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:339975 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: (ot) jQuery and char sets
You sound very smart, why didn't you just google this first? Called out and thrown under the bus (no disrespect):) ~| 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:339976 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: (ot) jQuery and char sets
On Fri, Dec 10, 2010 at 10:41 AM, Marc Funaro subscripti...@advantex.netwrote: You sound very smart, why didn't you just google this first? Called out and thrown under the bus (no disrespect):) Yeah, but I threw myself under the bus there ;) Suicide? ~| 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:339977 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: (ot) jQuery and char sets
Side track, and probably something you're doing already, but one little trick is to explicitly disable debug output in these things (saves you time going barmy when you/someone else uses cf debug output and your ajax stuff stops working). I.e. cfsetting showdebugoutput=false / cfcontent reset=Yes type=application/json; charset=utf-8 Dominic On 10 December 2010 15:29, Rick Root rick.r...@gmail.com wrote: On Fri, Dec 10, 2010 at 10:23 AM, Rick Root rick.r...@gmail.com wrote: I have a jquery.getJSON() call that is failing to call the result handler when the JSON dataset being returned contains an ASCII 132 character (an e with a backtick above it) ... in this case, it's part of someones last name. It's not generating any kind of javascript error either.. the json data is being returned, jquery just either isn't dealing with it or is failing silently (as jquery is known to do) What should I do here? Well Rick, that's easy.. just set your content type you're returning like this! cfcontent reset=Yes type=application/json; charset=utf-8 You sound very smart, why didn't you just google this first? Rick ~| 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:339978 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm