dbTalk Databases Forums  

UTF-8 in MSSQL

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss UTF-8 in MSSQL in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Keith Sauvant
 
Posts: n/a

Default UTF-8 in MSSQL - 09-08-2011 , 10:33 AM






Hi,

processing unicode data in MSSQL seems to require prefixing of all
constants in queries by a "N". That is not fun when it comes to unicode
enabling of big applications...

Is there a way around that?

Thank you in advance
Keith

Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: UTF-8 in MSSQL - 09-08-2011 , 04:00 PM






Keith Sauvant (oecher7.z.ksau (AT) spamgourmet (DOT) com) writes:
Quote:
processing unicode data in MSSQL seems to require prefixing of all
constants in queries by a "N". That is not fun when it comes to unicode
enabling of big applications...
In T-SQL all literals are typed, and string literals delimited by ''
are varchar. To get an nvarchar literal, you need N''.

This is not unique to T-SQL; in C++ "" refers to*a char[] literal, and to
get a wchar literal you need L"".

As for UTF-8, SQL Server does not support UTF-8 per se; the internal
storage format is UCS-2, and this is also used on the wire. However, a
good client API should hide this fact from you.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.