• 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: MSSQLServer Unicode Support
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

Then you'll need to ensure that EOF uses MSUnicodePlugin.  The tech note at <http://developer.apple.com/technotes/tn/tn2027.html> should provide enough info to make this happen.

Aloha,
Art

 _______________________________________________
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: 
 >MSSQLServer Unicode Support (From: Dov Rosenberg <email@hidden>)

  • Prev by Date: Re: Problem with Oracle adapter and update
  • Next by Date: Re: Problem with Oracle adapter and update
  • Previous by thread: MSSQLServer Unicode Support
  • Next by thread: Problem with Oracle adapter and update
  • Index(es):
    • Date
    • Thread