<p>We have in the process of upgrading our application to full Unicode comptibility as we have recently got Delphi 2009 which provides this out of the box.  I am looking for anyone who has experience of upgrading an application to accept Unicode characters.  Specifically answers to any of the following questions.</p>

<ul>
<li>We need to change VarChars to NVarchar, Char to NChar.  Are there any gotchas here.</li>
<li>We need to update all sql statements to include N in front of any sql strings.  So Update tbl_Customer set Name = 'Smith' must become Update tbl_Customer set Name = <strong>N</strong>'Smith' .  Is there any way to default to this for certain Fields.  It seems extraordinary this is still required.</li>
<li>Is it possible to get any defaults set up in SQLServer that will make this simpler?</li>
</ul>

<p>ps We also need to upgrade our Oracle code</p>

[{'answer_id': 81649, 'author': 'Toby Allen', 'author_id': 6244, 'author_profile': 'https://Stackoverflow.com/users/6244', 'pm_score': 0, 'selected': False, 'text': "<p>Damien </p>\n\n<p>I'm not sure how useful your answer is.  We have a large 700,000 lines of compiled codebase that was written over the last ten years which contains a large number of sql queries.  Most are standardised down to a few functions which are the basis for most of the updates on the database.  These can be updated quite simply.   However we also need to check every where clause for CustomerName = '%s'  which should now be CustomerName = N'%s'</p>\n\n<p>This is a real question which needs a real answer.</p>\n"}, {'answer_id': 81895, 'author': 'Hank Gay', 'author_id': 4203, 'author_profile': 'https://Stackoverflow.com/users/4203', 'pm_score': 2, 'selected': True, 'text': "<p>Oracle doesn't require you to use <code>nvarchar</code> to store Unicode strings—the server can be configured to store <code>varchar2</code> in UTF-8. If you only supported ASCII before, it should be transparent. That should prevent the need for all the application-side search-and-replace for <code>'</code> to <code>N'</code>.</p>\n\n<p>As for Damien's point: it might not help you now, but you should really make it a priority to get rid of non-parameterized queries. They are nothing but a drag on your system from a maintenance, performance, and safety standpoint.</p>\n"}, {'answer_id': 83060, 'author': 'Damien_The_Unbeliever', 'author_id': 15498, 'author_profile': 'https://Stackoverflow.com/users/15498', 'pm_score': 1, 'selected': False, 'text': '<p>Obvious with SQL Server is that the limits for nchar/nvarchar are half of their char/varchar counterparts (unless you migrate everything > 4000 to nvarchar(max))</p>\n'}]
['https://Stackoverflow.com/questions/81587', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6244/']