cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 潛龍勿用 (JIRA) <j...@apache.org>
Subject [jira] Created: (CAY-1550) don't support multibyte
Date Tue, 15 Mar 2011 07:41:29 GMT
don't support multibyte
-----------------------

                 Key: CAY-1550
                 URL: https://issues.apache.org/jira/browse/CAY-1550
             Project: Cayenne
          Issue Type: Task
          Components: Core Library, Database integration
    Affects Versions: 3.0.1
         Environment: resin pro 4.0.15 
win7 32bit
sun jdk 1.6.24
            Reporter: 潛龍勿用


project encoding is utf-8
HTML page encoding is utf-8
request.setCharacterEncoding("utf-8");
MySQL database encoding is utf-8
JDBC URL is "jdbc:mysql://localhost:3306/test?useUnicode=true&amp;characterEncoding=utf-8"

code:
String name = request.getParameter("name");    //name value is Chinese string "潛龍勿用"
ObjectContext context = DataContext.createDataContext();
 	Artist artist = context.newObject(Artist.class);
    	artist.setName(name);
    	out.println(name);    //output string is "潛龍勿用",is normal.
        context.commitChanges();    //after insert into database,view table record is "????"

get table record from database and view at page,view "????" too.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message