Getting question mark instead accented letter using spring MVC 3

Luis Felipe Perez picture Luis Felipe Perez · Feb 19, 2013 · Viewed 10.4k times · Source

I tried lots of thing and could not understand why i am getting ? instead accented character.

I'm using on my html:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

and my controller has the following code

@RequestParam ("name") String name
name = name.trim();
system.out.println(name);
//response t?ata
//expected tábata

how do I fix that?

Thanks

Answer

Luis Felipe Perez picture Luis Felipe Perez · Feb 20, 2013

I could fix this issue by adding the following code on my master template:

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>