
Signature
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
>> I am needing some way, in the SQL Server dialect of SQL, to escape
>> unicode code points that are embedded within an nvarchar string in a
[quoted text clipped - 8 lines]
>
> SELECT @str = 'This is a' + nchar(0x1245) + ' test'
When there are more than one or two non-US-ASCII characters in the string,
this quickly becomes impractically unwieldy, thus my comment in my original
posting:
--- quote ---
I am already aware of the UNISTR() function, and the NCHAR() function, but
those aren't going to work well if there are more than a few international
characters embedded within a string.
--- quote ---
Thanks anyway, though. :-)

Signature
---------------------------------------------------------------------
Greg R. Broderick usenet200705@blackholio.dyndns.org
A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------
Erland Sommarskog - 29 May 2007 22:23 GMT
> When there are more than one or two non-US-ASCII characters in the
> string, this quickly becomes impractically unwieldy, thus my comment in
> my original posting:
If the are in sequence, you could do:
convert(nvarchar, 0x34123512...)
although this is certainly not too funny as you have twitch the bytes
around.
Another solution to use something like Microsoft Visual Keyboard, and
simply put the actual characters there.

Signature
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx