Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Distinct languages in a database Expand / Collapse
Author
Message
Posted Friday, June 10, 2005 4:38 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, April 22, 2008 9:51 AM
Points: 19, Visits: 2

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.

Post #189419
Posted Saturday, June 11, 2005 6:06 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, March 29, 2006 3:04 PM
Points: 4, Visits: 1

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:

  • Instead of char datatype you have to use nchar datatype.
  • Instead of varchar you have to use nvarchar datatype.
  • Instead of text you have to use ntext datatype.

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

Post #189820
Posted Monday, June 13, 2005 2:38 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, April 22, 2008 9:51 AM
Points: 19, Visits: 2

Ok! Thank you

I will start with the second option!

Post #189890
Posted Friday, July 1, 2005 9:56 PM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Sunday, July 27, 2014 12:14 PM
Points: 3,433, Visits: 14,423

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.microsoft.com/downloads/details.aspx?FamilyID=6b6fb09f-f25c-48e9-9e26-b55144600da1&DisplayLang=en

http://www.aspnetresources.com/blog/unicode_in_vsnet.aspx

Kind regards,

Gift Peddie



Kind regards,
Gift Peddie
Post #196501
Posted Thursday, February 9, 2006 1:48 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, March 23, 2009 9:10 AM
Points: 67, Visits: 6
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.
Post #257247
Posted Wednesday, February 15, 2006 7:48 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Sunday, July 27, 2014 12:14 PM
Points: 3,433, Visits: 14,423

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
Post #258658
Posted Wednesday, February 15, 2006 12:07 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, March 23, 2009 9:10 AM
Points: 67, Visits: 6
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?)

Post #258797
Posted Tuesday, May 13, 2008 3:33 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, May 13, 2008 5:30 AM
Points: 1, Visits: 2
hi julie,

Have you got solution for storing Chinese language in sql server. can you please explain me.
Post #499406
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse