Re: MSSQLServer Unicode Support
Re: MSSQLServer Unicode Support
- Subject: Re: MSSQLServer Unicode Support
- From: Art Isbell <email@hidden>
- Date: Tue, 10 Oct 2006 17:41:16 -1000
On Oct 10, 2006, at 2:24 PM, Dov Rosenberg wrote: In order to store unicode data into one of these columns it is necessary to preface the value with an N such as INSERT into locale (recordid, localedesc) values (123, N’日本語'); Otherwise only ??? Will be stored in the database. In order to find the data again you must also preface the values in the WHERE clause with N like: SELECT * from locale where localedesc like N'日本%';
I think I need to either modify the SQL being generated by the MSSQL Server plugin or modify the plugin itself to generate the correct SQL. Any thoughts on the correct direction would be appreciated (as well as some guidance on what and where I need to start).
It's been a while since I've done something like this, but I think you'll first need to subclass MicrosoftPlugIn (e.g., "MSUnicodePlugin") and override its defaultExpressionClass() method to return the Class object of your MSUnicodePlugin inner class MicrosoftPlugIn.MicrosoftExpression subclass (e.g., "MSUnicodePlugin.MSUnicodeExpression"). In MSUnicodePlugin.MSUnicodeExpression, override formatValueForAttribute(). Get the value returned by super.formatValueForAttribute(). If the attribute's externalType is "nchar", "ntext", or "nvarchar", prepend "N" to the value before returning it.
Aloha, |
_______________________________________________
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