1

I'm using Spring to retrieve validated object from my form:

@RequestMapping(value = "/doCreate", method = RequestMethod.POST)
public String doCreate(Model model, @Valid Offer offer, BindingResult result) {

    System.out.println(offer.getName());

}

The problem is that offer doesn't contain proper utf-8 characters within it.

For example, having żółć entered in field corresponding to offer.name, I end up with żółć running above code.

ex3v
  • 3,518
  • 4
  • 33
  • 55
  • Are you sure you aren't actually inserting `żółć`; I don't know any JDBC driver that would convert to html entities. It sooner looks like this is what you actually try to insert. You might want to check if some form of encoding happens before your insert. – Mark Rotteveel Sep 11 '14 at 07:59
  • Good point, gonna check it when I get back home! Thanks – ex3v Sep 11 '14 at 08:26
  • @MarkRotteveel I've checked and you're right. Updated the question. – ex3v Sep 15 '14 at 18:17
  • Which browser and which web container do you use? – Henry Sep 15 '14 at 18:40
  • Chrome 37, Tomcat 7. Happens also inside Eclipse built-in browser. – ex3v Sep 15 '14 at 19:09

0 Answers0