Re: UNICODE and Encoding

From: Bart Duncan [MSFT] (bartd_at_online.microsoft.com)
Date: 03/24/04


Date: Wed, 24 Mar 2004 00:34:58 GMT

Note that UCS-2 is a proper subset of UTF-16 (it's essentially the subset
of UTF-16 that doesn't involve surrogates). Also note that any UTF-16
character, including surrogates, can be stored and retrieved intact in
SQL Server. Don't expect intelligent sorting or comparisons of
surrogates, though -- SQL doesn't know the "meaning" of Unicode
characters that take two 16-bit code units to store.

Bart
------------
Bart Duncan
Microsoft SQL Server Support

Please reply to the newsgroup only - thanks.
This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
From: "Stefan Delmarco [MSFT]" <StefanDe@online.microsoft.com>
References: <11fb401c410f5$ff4db090$a301280a@phx.gbl>
Subject: Re: UNICODE and Encoding
Date: Tue, 23 Mar 2004 17:44:03 -0000
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <Oy31v5PEEHA.2700@tk2msftngp13.phx.gbl>
Newsgroups: microsoft.public.sqlserver.programming
NNTP-Posting-Host: tide136.microsoft.com 213.199.144.167
Path:
cpmsftngxa06.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP
08.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.programming:433036
X-Tomcat-NG: microsoft.public.sqlserver.programming

Neither, From BOL:
nchar and nvarchar
Character data types that are either fixed-length (nchar) or
variable-length
(nvarchar) Unicode data and use the UNICODE UCS-2 character set.

Cheers,
Stefan

-- 
This posting is provided "AS IS" with no warranties, and confers no 
rights.
"KP" <anonymous@discussions.microsoft.com> wrote in message
news:11fb401c410f5$ff4db090$a301280a@phx.gbl...
> What is the default encoding for UNICODE characters in SQL
> Server, UTF-8 or UTF-16?


Relevant Pages

  • Re: Unicode Support
    ... if two Unicode strings are the same? ... UTF-16 is basically telling everyone "ok we all got to start ... character, and will likely support *both* endians. ... UTF-8 encodings are also easy to learn to ...
    (alt.lang.asm)
  • WM_CHAR
    ... Note that WM_CHAR uses 16-bit Unicode ... of the character key that was pressed. ... version of Windows. ... WM_CHAR chooses between UTF-16 and ASCII depending on whether the window ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Another Cross Platform Delphi Tought
    ... UnicodeString will be UTF-16 encoded. ... At one point is was the same as a Unicode ... -- which knows about the surrogates? ... Processing text and rendering text for display and/or print are two ...
    (borland.public.delphi.non-technical)
  • Re: Unicode
    ... That's why I said read up on unicode! ... The short version is that UTF-16 is basically wasteful. ... range) where UTF-8 does not. ... other character sets are needed (really? ...
    (comp.lang.ruby)
  • Re: Unicode
    ... That's why I said read up on unicode! ... The short version is that UTF-16 is basically wasteful. ... range) where UTF-8 does not. ... other character sets are needed (really? ...
    (comp.lang.ruby)