• 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: Migrations encoding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Migrations encoding


  • Subject: Re: Migrations encoding
  • From: Tusker <email@hidden>
  • Date: Tue, 16 Jun 2009 14:05:21 -0700


On Jun 15, 2009, at 12:34 PM, Chuck Hill wrote:


On Jun 15, 2009, at 11:45 AM, Tusker wrote:

Yup. I made sure it was using bbedit.

Was the file close to twice as large after you did this?


Good point. Yes, the file got twice as big.


I read in the sql file manually(using FileInputStream with UTF-16 encoding) and inserted it into the database via editingcontext with no problem at all. How else can I make sure it's encoded properly?

I am not sure. But it looks like an encoding issue. These can be a lot of fun.

I agree, I'll report back if I ever figure it out. I was going to look at the migrations source code next for clues. I appreciate your help.



Chuck



On Jun 14, 2009, at 12:20 PM, Chuck Hill wrote:


On Jun 12, 2009, at 10:59 AM, Tusker wrote:

Hi,

Same problem. I'm actually using a *.sql file within the Resources folder. It's been working great until I got to unicode characters.

I'm using this to call the *.sql. I've made sure that it is encoded (UTF-16). Also tried (UTF-8)


You made sure it was encoded in UTF-16 or you just told Eclipse that it was? I don't think that Eclipse will re-encode the file if you do that.


Chuck



ERXJDBCUtilities.executeUpdateScriptFromResourceNamed(channel, "mysqltest.sql", null);


I tried changing the name to "name". Works fine until I introduce unicode characters.

Somewhere between reading the file to execution, the encoding is not right.

This is what ends up in the database:

Belgium/België/Belgique

Thanks


On Jun 12, 2009, at 10:34 AM, Jon Nolan wrote:

Tusker wrote:
I changed the file to be UTF-16 but I get an error now. I use the same sql file and manually run it in frontbase, it works. Example of the statement:

update Country set name = 'Belgium/België/Belgique' where country_id = 2;

"name" is a reserved word in Frontbase although FBManager (not sure about sql92) can often/usually/always handle non-quoted reserved words depending on how you're using them. I've always had to double-quote reserved words when working in Migrations though. i.e.

ERXJDBCUtilities.executeUpdate(database.adaptorChannel(), "update SITE set \"TYPE\" = 1 where \"TYPE\" = 10");


Of course it might still be an encoding issue but let's rule out this potential problem first. Try..



update Country set "name" = 'Belgium/België/Belgique' where country_id = 2;
_______________________________________________
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

-- Chuck Hill Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/




-- Chuck Hill Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/


_______________________________________________ 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: 
 >Migrations encoding (From: Tusker <email@hidden>)
 >Re: Migrations encoding (From: Chuck Hill <email@hidden>)
 >Re: Migrations encoding (From: Tusker <email@hidden>)
 >Re: Migrations encoding (From: Jon Nolan <email@hidden>)
 >Re: Migrations encoding (From: Tusker <email@hidden>)
 >Re: Migrations encoding (From: Chuck Hill <email@hidden>)
 >Re: Migrations encoding (From: Tusker <email@hidden>)
 >Re: Migrations encoding (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Hudson and Client-Side Classes
  • Next by Date: Re: EOF in Java Application
  • Previous by thread: Re: Migrations encoding
  • Next by thread: Any chocolate announcements
  • Index(es):
    • Date
    • Thread