June 10, 2005 at 4:38 am
Hi everybody
First of all, I must say that this is my first approach to collations, languages , sort orders, etc... 🙂
I work in an international company, that works in different countries all over the world. Before now, we haven't had problems with languages because, almost everything was in spanish or english, so we can store all the data correctly. But now, We have to store german messages in tables, and I don't know what to do. Because the apllication is still in english but some columns must show german characters.
What do you recommend me?
We'll have to store chinese in three months time !!! so, i wonder if there is a way to be prepare to store this data in the same server.
Thank you very much in advance!!! (and sorry for my english)
Julia.
June 11, 2005 at 6:06 am
I do not know what your case exactly is but next two proposes are exposed:
One solution is to have different databases with different collations (one for each language you need).
If you need to maintain all your data in one database next will be the right solution:
If you have to store chinese characters, spanish, german, etc. in just one database, one solution (I think the only one) is to convert your character datatypes to unicode:
nchar, nvarchar and ntext use unicode characters that are saved with two bytes per character instead of one byte. Unicode columns are almost independent of the collation of your database.
On the other hand, query sentences are affected. For exemple, you will have to use:
insert into table1 values (N'hello') instead of: insert into table1 values ('hello')
However, globalization must be studied carefully. I recommend to investigate more before you decide the final solution.
Here you have a good link to start to know more about unicode:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/sql_dataencoding.asp
June 13, 2005 at 2:38 am
Ok! Thank you
I will start with the second option! 🙂
July 1, 2005 at 9:56 pm
You need to localize both the database and application. You can download the Enterprise localization tool kit from the link below and use the second link to localize the application in Visual Studio .NET. A quick trick put XML and others in notepad and save the file as Unicode. Try the links below to get started. I am assuming you know NVarchar and NChar are 4000 and NText is 2gigs. Hope this helps.
http://www.aspnetresources.com/blog/unicode_in_vsnet.aspx
Kind regards,
Gift Peddie
Kind regards,
Gift Peddie
February 9, 2006 at 1:48 pm
Also, as you mentioned Chinese, be aware that the assumption that every Unicode character (codepoint) can be represented as two bytes, is an old assumption from a ten-year old Unicode encoding called UCS-2LE, which is what was used in Windows NT, and which is still used (I think) by Microsoft SQL Server, and *!* which is a safe assumption outside of the Chinese language.
But if you get into Chinese, you will have to decide if Unicode 2.0 (the old list that had no more than 65536 characters, and therefore could be represented in a fixed-size 2-byte encoding) is good enough -- the issue that may come up is GB18030, which is newer than that, and has more Chinese characters than fit in that old version.
UTF-8 is a modern encoding, and holds all Unicode characters, but, SQL Server 2000 at least cannot deal with it natively. I don't know about SQL Server 2005.
February 15, 2006 at 7:48 am
Try the link below I covered SQL Server Chinese collation in detail in another forum. Hope this helps.
http://forums.asp.net/1067798/ShowPost.aspx
Kind regards,
Gift Peddie
Kind regards,
Gift Peddie
February 15, 2006 at 12:07 pm
Gift Peddie, I don't understand how that link is at all relevant -- I don't see any mention of GB18030 in it -- in fact, it looks like mostly just codepage numbers & names copied & pasted in from Books Online or somewhere?
Sorry if I've missed the point-- could you kindly explain the relevance?
PostScript: I just realized that you probably were responding to earlier thread content, not to my babble^h^h^h^h^hpost, so that is probably why I was confused.
(I've also just realized that since these forums are inconveniently hidden behind some login page. they may not be getting googled--which would kind of make them a bad place for discussions?)
May 13, 2008 at 3:33 am
hi julie,
Have you got solution for storing Chinese language in sql server. can you please explain me.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply