• 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 10:19:40 -1000

OK,

this is getting stranger by the moment.

This string works:
10 oz portion broiled with Buzzs Season Sautéed Hamakua Mushroom

And this string works:
10 oz portion broiled with Buzzs Season Sauteed Hamakua Mushrooms

This string does not work:
10 oz portion broiled with Buzzs Season Sautéed Hamakua Mushrooms

The difference being that the last string contains the é and is one character longer than the first string.  If I add the character anywhere else it also fails.

Johnny Miller
Kahalawai Media Corp.
www.kahalawai.com



On Nov 8, 2011, at 7:56 AM, Ray Kiddy wrote:

>
> On Nov 7, 2011, at 10:48 PM, Johnny Miller wrote:
>
>> Hi
>>
>> I'm getting an com.webobjects.eoaccess.EOGeneralAdaptorException (-- error code: 1366 -- msg: Incorrect string value: '\xE9ed Ha...' for column 'DESCRIPTION' at row 1) when savings characters like é.  I'm using a MySQL database 5.5 with the encoding set to UTF-8 unicode and the collation set to utf8_general_ci.  The encoding and collation settings on the table and column appear to match the database.  And this issue seems to only effect columns using the type LONGTEXT.
>>
>> Can someone point me to where I have gone wrong?
>>
>> Thank you,
>>
>> Johnny Miller _______________________________________________
>
> Can you send SQL output, from setting EOAdaptorDebugEnabled?
>
> The fact that you are using a column named "DESCRIPTION" is making me uncomfortable. It may be fine. In the old days, there were vestiges of the Objective-C tools hanging around and it would have been very bad to get in the way of NSObject's [description] method. We are probably past needing to worry about, though. Still. And you cannot use "DESC" since that is a MySQL keyword. I usually use "note" or "annotation" or something like that for a "description" column.
>
> This might end up being a really great test case. Can you send in some version of your table create statements? I could try to reproduce the problem. I have not had cause to use LONGTEXT specifically. Does the problem not occur when using some other, similar data types? I would be curious if the MySQL forums say anything about LONGTEXT in particular.
>
> What encoding are you using for strings in your java code? Is it the default encoding? What platform are you on? The default encoding is different for Mac OS X than for Linux versions and (I would assume) for different Windows versions.
>
> The question is also going to be asked: Which version of WO are you using? Are you also using Wonder? Which MySQL plugin are you using? WO's or Wonder's?
>
> I have had to learn entirely too much about encodings and all the ways this can get screwed up in the last few months. I would not want to do a brain dump of all that crap on the list, but we can talk off-list if it would help.
>
> cheers - ray
>
> _______________________________________________
> 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

 _______________________________________________
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

  • Follow-Ups:
    • Re: Problem saving accented characters to MySQL DB.
      • From: Chuck Hill <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: Is JDBCAdaptor generating the wrong SQL for fixed length character columns?
  • Next by Date: Re: Problem saving accented characters to MySQL DB.
  • 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