Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting question mark instead accented letter using spring MVC 3

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

like image 820
Luis Felipe Perez Avatar asked Feb 19 '13 03:02

Luis Felipe Perez


1 Answers

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" %>
like image 146
Luis Felipe Perez Avatar answered Nov 15 '22 16:11

Luis Felipe Perez