raulriera / Remote-Form-Helpers

AJAX Form Helpers for ColdFusion on Wheels
14 stars 8 forks source link

Unable to add charset=UTF8 to addFormat() #16

Open neokoenig opened 12 years ago

neokoenig commented 12 years ago

Returned Javascript rendered via

#pageReplaceHTML(selector=".mySelector", content=myContent)# 

does not respect UTF8 encoding.

If you add

;charset=UTF-8

to:

<cfset addFormat(extension="js", mimeType="text/javascript")>

(I.e)

<cfset addFormat(extension="js", mimeType="text/javascript;charset=UTF-8")>

The plugin breaks (specifically, it seems to give up looking for /views/bar/foo.js.cfm, and instead tries to load /views/bar/foo.cfm

Full code example of the context I'm using it in can be found here: http://www.oxalto.co.uk/2012/06/creating-an-ajax-mysql-full-text-search-in-cfwheels/

devalnor commented 12 years ago

This maybe in relation with this bug:

http://code.google.com/p/cfwheels/issues/detail?id=844&colspec=ID%20Type%20Status%20Severity%20Milestone%20Owner%20Summary

I provided a patch, it may help.