Thursday, September 13, 2012

Is SetCharacterEncodingFilter a thing of the past?

I thought so. But I was wrong. I thought after all those years of hacking the encoding parameters in our java application they had sorted it out. In our latest migration to JBoss EAP 5 i made sure that we didn't need those hacks. But we also had to change the jsp and response encoding to UTF-8 for other reasons.

This turned out bad. JBOSS is hard set to ISO-8859-1 internally which means that a form submission in UTF-8 will decode incorrectly. Now, we did set the accept-charset tag on all forms, but Internet Explorer ignores the property. We tried to hack the poor explorer with ugly javascripts which made it work. But finally we let in an added the good old encoding filter anyway.

Our options was to either change the page encoding to ISO. This would have broken an old external system (yepp, it's old, it must get UTF-8, it "can't" be changed). Or we could have changed the encoding settings in the JBoss configuration files. This would have broken other applications on the same server.

But still, why did the JBoss community decide to take this path? How does users in non-western countries do? Is JBoss designed for Europe only?

No comments:

Post a Comment