SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Chinese characters (Mandarin) in varchar?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

drumm
Starting Member

Denmark
14 Posts

Posted - 06/17/2003 :  08:17:05  Show Profile  Visit drumm's Homepage  Reply with Quote
Hi,

we're going to localize one of our applications for use in China. Mandarin has been chosen as the language, but is it possible to store these characters in a VARCHAR? Or a NVARCHAR?

Any pros and cons would be greatly appreciated!

Thanks in advance,

Thomas

Nazim
A custom title

United Arab Emirates
1408 Posts

Posted - 06/17/2003 :  11:58:27  Show Profile  Reply with Quote
you should use nvarchar to store any unicode values.

Remember nvarchar takes 2 bytes to store one character. so the max size is 4k instead of 8k as is the case with varchar.

you have convert the character to nvarchar while you are inserting.

eg:
insert into sometable(field) values(N'chinese characters')

HTH


-------------------------
What lies behind you and what lies ahead of you are small matters compared to what lies within you.-Ralph Waldo Emerson
Go to Top of Page

drumm
Starting Member

Denmark
14 Posts

Posted - 06/18/2003 :  04:12:06  Show Profile  Visit drumm's Homepage  Reply with Quote
Thanks for your help, Nazim!

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000