Title: MSSQLServer Unicode Support
I finally have gotten some more time to figure out how to deal with MS SQL Servers unicode support using EOF.

As a refresher – here is the problem:
To support unicode in MSSQL Server, the columns need to be nchar, ntext, or nvarchar (not a problem). 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'日本%';

What I have learned so far:
Chuck Hill suggested using the Read and Write Format attributes of the EOModel to add the N’s. The Read Format he suggested was N %P. When I added that in WO/EOF generated SQL like

    SELECT  recordid, N localedesc from locale...;

Which is invalid

For the Write Format he suggested N %V. EOF generated the following SQL:

    INSERT into locale (recordid, localedesc) values (N ?, N ?) as a prepared statement with bindings (recordid:123; localedesc:日本語)

Which also didn’t seem to work.

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).

Thanks in advance



--
Dov Rosenberg
Conviveon/Inquira
Knowledge Management Experts
http://www.conviveon.com
http://www.inquira.com

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Reply via email to