Special characters incongruence
Posted
by Enrique
on Stack Overflow
See other posts from Stack Overflow
or by Enrique
Published on 2010-04-24T20:56:12Z
Indexed on
2010/04/24
21:03 UTC
Read the original article
Hit count: 219
Hello I'm building a Spring MVC web application that runs on Tomcat 6.0.20 and JDK 1.6.0_19. When I send some special characters through an HTML form some of them are stored as question marks ?
For example these symbols are stored correctly: €, á, é, í, ‰, etc But some symbols are replaced with ? like: £, ?, ?
MySQL tables charset is utf-8. My jsp also use utf-8
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
I have included org.springframework.web.filter.CharacterEncodingFilter in web.xml as suggested here
When I debug the POST request when sending 3 characters €a£ with firebug I get: %E2%82%ACa%E2%82%A4 which is correct since E2 82 AC is the code for € and E2 82 A4 is the code for £ but £ is stored as ? in the database. When I save £ directly into the database it is displayed correctly in the webpage.
How can I fix this?
© Stack Overflow or respective owner