views:

69

answers:

2

Hello, i have an application with use Hibernate and Mysql. In Mysql i have a blob in my table. When i record a value in this table with accent like é or è in mysql i have a good result (binary) so when i want read into my jsp i have ? instead of é

A: 

You cannot reliably use accented characters in HTML. You should actually use HTML character codes. I believe this is due to interpretation of the characters by the browser.

Have a look at this stackoverflow question which suggests a java library to handle this kind of stuff.

extraneon
Mercer
@Mercer it might if your JSP also sends a header stating it's UTF-8 so the browser knows how to interpret it. I believe that might just be more work, and less reliable, than converting the string.
extraneon
A: 

Wrong response encoding? Do you use the following directive in your JSPs?

<%@ page contentType="text/html; charset=UTF-8" %> 
Pascal Thivent
i use this in my jsp<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
Mercer
@Pascal is suggesting a solution. Have you tried it?
Stephen C