Use a servlet filter? Martijn
On Fri, Dec 14, 2012 at 12:49 PM, Bas Gooren <b...@iswd.nl> wrote: > Hi *, > > We're integrating with a third party. They call a rest endpoint which we > handle through wicket (a special page subclass). > > We run a full utf-8 stack, and during integration testing we encountered a > weird problem. > One of the post parameters (a bit of text) is showing the Unicode > replacement character (U+FFFD), shown as > "h�ngt p� d�" (when the actual content is "hängt på dörr"). > > After a bit of digging I found out that they send an > application/x-www-form-urlencoded body without a charset specified. Tomcat > thus parses it using the default setting (utf-8). > > So my problem is this: I get iso-8859-1 content, which is parsed as utf-8, > which does not work. > > Is there a way to make wicket interpret this one request as iso-8859-1? > I've taken a look at HttpServletRequest#setCharacterEncoding(), but calling > that from within our endpoint (= wicket page) is too late. > Wicket has already called ServletWebRequest#isAjax(), and thus post > parameters have already been parsed. > > Unfortunately, I cannot re-interpret the string as latin1, as I don't have > access to the original byte[] data. > > FYI: Wicket 1.5 > > -- > > Met vriendelijke groet, > Kind regards, > > Bas Gooren > -- Become a Wicket expert, learn from the best: http://wicketinaction.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org