struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict <pbened...@apache.org>
Subject Re: unicode character is in wrong format
Date Mon, 14 Dec 2009 12:14:51 GMT
Nguyen,

On 12/13/2009 11:04 PM, Nguyen Xuan Son wrote:
> dear all
> im using PreparedStatement.setNString(int, String)
> to insert the japanese characters into my MySQL database
> but the result is all in "?????????" characters
>
> PreparedStatement pstmt = conn.prepareStatement(sql5);
> pstmt.setNString(3, item.getTitle());
> rs = pstmt.executeUpdate();
>
> do you have any suggestion?
>

Most likely your (1) tables/columns are not using UTF-8 to store data 
and (2) neither is your MySQL database connection.

Do a google search to learn how to store international characters in 
MySQL and JDBC.

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message