All special characters showing up as à (A tilde) using Coldbox's SES

594 Views Asked by At

Using coldbox, Coldfusion 9.

I have tested this with a form-post and a url parameter. In both cases, I submit the string:

"à á Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü ß"

, and in both cases I immediately dump the input to the browser, which now looks like:

"à á à à à à à à à à à à à à à à à à à à à à à à à à à Ã"

.

The meta-tag has: charset=utf-8 and I have also tried charset=iso-8859-1.

It makes no difference.

GetLocale() = en_IE
GetEncoding("url") = UTF-8 
GetEncoding("form") = UTF-8

Now, what's interesting is that I built a simple CF page on the same server but outside of the Coldbox framework and the characters display correctly after the form/url post.

In Coldbox, the form and url values are transferred to the RequestCollection (RC). If I dump the RC immediately after the form/url post I see the wrong characters.

Therefore it is starting to look like Coldbox is taking the 'good' characters out of the native url/form scope and putting the 'bad' characters in their place in the RC.

Can anyone suggest where I can look next? Is there a ColdBox setting I should look for? Might it be something else entirely?

UPDATE

I am calling the script with SES-style routing like this:

/index.cfm/Organisation/get/q/à á Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü ß

If I call it in a more conventional manner, I get the correct characters to display!

/index.cfm/Organisation/get?q=à á Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü ß

Trouble is, the whole application uses SES so I can't start refactoring it. So I need to find something in the SES configuration that makes it go wrong. Weird...

Anybody seen this before?

0

There are 0 best solutions below