MySQL and TEXT column
MySQL and TEXT column
- Subject: MySQL and TEXT column
- From: Daniel Muller <email@hidden>
- Date: Fri, 13 Dec 2002 11:07:20 +0100
Hi all,
I access to a MySQL db and everything works well except the character
encoding for TEXT column type. When I save a record all characters are
saved using "iso-8859-1" encoding except those for TEXT column type, it
works fine for VARCHAR column type. It seems that for TEXT column type
UTF-8 is used instead of iso-8859.
Any idea or suggestion?
Regards,
Daniel
--
the connection url is:
jdbc:mysql://myserver:3306/mydb?useUnicode=true&characterEncoding=ISO-
8859-1
the below code has been added to the session class:
public void appendToResponse(WOResponse aResponse, WOContext aContext)
{
aResponse.setContentEncoding("ISO8859_1");
aResponse.setHeader("text/html; charset=iso-8859-1;
encoding=iso-8859-1", "content-type");
super.appendToResponse(aResponse, aContext);
}
public void takeValuesFromRequest(WORequest aRequest, WOContext
aContext)
{
aRequest.setDefaultFormValueEncoding("ISO8859_1");
super.takeValuesFromRequest(aRequest, aContext);
}
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.