Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Extended character sets in column w/ varchar

Author  Topic 

sfortner
Yak Posting Veteran

63 Posts

Posted - 2007-06-22 : 14:21:24
We have a sql server 2000 db that took what looks like extended character sets for names like Björck, Osterås, Halldórsson, etc. in a varchar(50) field. I didn't think that was possible? I ended up using nvarchar data types in our sql server 2005 db because we have to support the world. Can I use varchar?

--Steve

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-06-22 : 15:23:14
You should use nvarchar type.
Go to Top of Page

sfortner
Yak Posting Veteran

63 Posts

Posted - 2007-06-22 : 16:01:04
How are those characters getting stored in a varchar field?

--Steve
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-06-22 : 16:38:19
Normal characters are in the range of hex 0x00 to 0x7F.

The characters you are seeing are in the range of hex 0x80 to 0xFF.

All are valid for varchar.


select
x= convert(varchar(1),0xF6),
y= convert(varchar(1),0xE5),
z= convert(varchar(1),0xF3)

Results:

x y z
---- ---- ----
ö å ó

(1 row(s) affected)



CODO ERGO SUM
Go to Top of Page
   

- Advertisement -