Hello Matt, this has been discussed a couple times in the mailing list, the summary is: 1-You need to make sure the page has a correct UTF-8 header ------------ in Application.java public void appendToResponse(WOResponse response, WOContext wocontext) { super.appendToResponse(response, wocontext); // This must be done after the page generation to override the default header created by WO during the page generation. if (_NSUtilities.UTF8StringEncoding.equals(response.contentEncoding())) response.setHeader("text/html; charset=UTF-8", "content-type"); } public WOResponse createResponseInContext(WOContext wocontext) { WOResponse woresponse = super.createResponseInContext(wocontext); woresponse.setContentEncoding(_NSUtilities.UTF8StringEncoding); return woresponse; } ------------ 2-You need to make sur the form will be received in UTF-8 ------------ in Session.java public void takeValuesFromRequest(WORequest aRequest, WOContext aContext){ aRequest.setDefaultFormValueEncoding(_NSUtilities.UTF8StringEncoding); super.takeValuesFromRequest(aRequest, aContext); } ------------ 3-You need to make sure the page that contains the form declares itself in UTF-8 ------------ <meta http-equiv="content-type" content="text/html;charset=utf-8"> ------------ 4-You need to make sure the database is UTF-8, either by having something in your my.cnf file (for newly created database) ------------ [mysqld] default-character-set=utf8 character-set-server = utf8 [mysql] default-character-set=utf8 ------------ or by making sure it is set appropriatly 5-Use the following connection dictionary (even if the unicode/utf parts are not necessary as it should already been discussing using UTF-8) ------------ useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull ------------ 6-Remember that blob doesn't have a character encoding, so you shouldn't store a string in a blob but rather use mediumtext. I think you've got everything. If you still have some issue, you should be checking how to convert the text encoding on existing field in the database as they were probably not UTF-8 at the beginning...maybe try to dump the database, drop it recreate it 'making sure it's UTF-8 thanks to the my.cnf parameters). Xavier
|
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to archive@mail-archive.com