• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem saving accented characters to MySQL DB.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem saving accented characters to MySQL DB.


  • Subject: Re: Problem saving accented characters to MySQL DB.
  • From: Johnny Miller <email@hidden>
  • Date: Tue, 08 Nov 2011 09:40:05 -1000

Hi Ray,

OK.  

SQL Output:  evaluateExpression: <com.webobjects.jdbcadaptor._MySQLPlugIn$MySQLExpression: "UPDATE MENU_ITEM SET DESCRIPTION = ?, LAST_UPDATE = ? WHERE (id = ? AND MENU_ID = ?)" withBindings: 1:"10 oz portion broile...ed Hamakua Mushrooms"(description), 2:2011-11-08 09:26:47(lastUpdate), 3:125(id), 4:4(menuID)>
Nov 08 09:26:47 KMCustomerPortal[4042] INFO  er.transaction.adaptor.Exceptions  - Database Exception occured: com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor._MySQLPlugIn$MySQLExpression: "UPDATE MENU_ITEM SET DESCRIPTION = ?, LAST_UPDATE = ? WHERE (id = ? AND MENU_ID = ?)" withBindings: 1:"10 oz portion broile...ed Hamakua Mushrooms"(description), 2:2011-11-08 09:26:47(lastUpdate), 3:125(id), 4:4(menuID)>:
    Next exception:SQL State:HY000 -- error code: 1366 -- msg: Incorrect string value: '\xE9ed Ha...' for column 'DESCRIPTION' at row 1

re: DESCRIPTION - ok, good to know.  In the future I'll use one of your suggestions.

Table structure (it's a little different now that I've tried setting the character set on the table - I'm having the same issue with other tables but they don't have that character set enforcement).

CREATE TABLE `MENU_ITEM` (
  `CREATE_DATE` datetime DEFAULT NULL,
  `DESCRIPTION` longtext CHARACTER SET utf8,
  `ID` int(11) NOT NULL,
  `LAST_UPDATE` datetime DEFAULT NULL,
  `MENU_ID` int(11) NOT NULL,
  `PICTURE_ID` int(11) DEFAULT NULL,
  `POSITION` int(11) DEFAULT NULL,
  `PRICE` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  `TITLE` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `MENU_ITEM_PICTURE_ID_ID_FK` (`PICTURE_ID`),
  KEY `MENU_ITEM_MENU_ID_id_FK` (`MENU_ID`),
  CONSTRAINT `MENU_ITEM_MENU_ID_id_FK` FOREIGN KEY (`MENU_ID`) REFERENCES `MENU_SECTION` (`id`),
  CONSTRAINT `MENU_ITEM_PICTURE_ID_ID_FK` FOREIGN KEY (`PICTURE_ID`) REFERENCES `ASSET` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

re: LONGTEXT, yes if I use é on columns that are using VARCHAR I don't have this problem.  CURIOUSLY enough if I just save é into DESCRIPTION without any other text it works >:(

re: Java code - default encoding. 

re: Platform.  I'm having this problem on client and server.  Client == OSX 10.7, Server == OS X 10.5 Server

WO = 5.4.3
Wunder = Yes, a recent version.  
Wunder's MySQL plugin = Yes.
MySQL: mysql  Ver 14.14 Distrib 5.5.15, for osx10.6 (i386) using readline 5.1
Java: java version "1.6.0_26"

Any help would be greatly appreciated.  

Johnny Miller
Kahalawai Media Corp.
www.kahalawai.com


Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Problem saving accented characters to MySQL DB. (From: Johnny Miller <email@hidden>)
 >Re: Problem saving accented characters to MySQL DB. (From: Ray Kiddy <email@hidden>)

  • Prev by Date: Re: Raw SQL with bindings
  • Next by Date: modern look and page tabs
  • Previous by thread: Re: Problem saving accented characters to MySQL DB.
  • Next by thread: Re: Problem saving accented characters to MySQL DB.
  • Index(es):
    • Date
    • Thread