0

We are doing an installation of our web-based application (.NET against SQL Server 2008) in Germany. We are in the midst of internationalizing the application and database. I realize that some languages (e.g. in India or China) require extended character sets. These extended character sets require data types of NVARCHAR (instead of VARCHAR) in SQL Server.

Due to an already aggressive timeline, I'd like to make the transition from VARCHAR to NVARCHAR in a later release. I have researched but could not find a definitive answer to this question:

Will SQL Server's VARCHAR datatype fully support the German language?

Shoeless
  • 666
  • 1
  • 5
  • 20
  • not sure, but if you select UTF8 as *collation*, you should be ok... – CapelliC Dec 10 '12 at 14:26
  • 1
    I think you need nvarchar. http://stackoverflow.com/questions/612430/when-must-we-use-nvarchar-nchar-instead-of-varchar-char-in-sql-server – webNoob Dec 10 '12 at 14:27
  • 1
    @webNoob: the accepted answer for the linked question seems to enforce that UTF8 should work for the OP – CapelliC Dec 10 '12 at 14:28
  • I've always been taught that if you have more than one language in your tables you should use nvarchar. But yes fail me for trying to answer questions on one cup of coffee. – webNoob Dec 10 '12 at 14:33
  • I'm curious as to why you think using `VARCHAR` is simpler than `NVARCHAR`? Since you seem to know that you will need support for multiple languages, why not just define your data types as `NVARCHAR` now and then you will have no future data model "transition" tasks at all? And to answer your immediate question about German characters (I assume you mean ß Ö Ü etc.), why not just try it? Create a database (or table) with the collation and data types that you want and just experiment. That will give you a far faster answer than asking here, although of course it will be limited to only German. – Pondlife Dec 10 '12 at 15:11
  • @CapelliC: there is no such thing as a "UTF-8" collation - collations are something totally different than character encoding (that's what UTF-8 is). SQL Server doesn't support UTF-8 - it works with UCS-2/UTF-16 all the time. – marc_s Dec 10 '12 at 16:55
  • @marc_s: I don't have SQL Server available, (I said I was unsure) but MySQL (for instance) has collations utf8_general_ci,utf8_bin etc etc. Sounds strange SQL Server miss them... – CapelliC Dec 10 '12 at 17:41
  • I am looking for a definitive answer based on someone with direct experience. – Shoeless Dec 10 '12 at 18:37
  • @Pondlife - I am certain we will need to eventually support NVARCHAR. My concern is that right now the DB is designed using VARCHAR, and the effort required to perform the conversion may exceed the timeline currently allotted to the project. If VARCHAR is sufficient for supporting the German language, then the conversion is not something I need to deal with in this development cycle. – Shoeless Dec 10 '12 at 18:40
  • Sorry - time ran out before I could edit my 1st comment above... Yes, I could cram a bunch of German characters into a database column (and I might just try that- thanks!), but if there are any subtle nuances, I might miss them because my ability to communicate in German is virtually non-existent :) – Shoeless Dec 10 '12 at 18:43

1 Answers1

0

The default encoding for CHAR is iso_1, which is actually ISO 8859-1. The Wikipedia page for this standard states that German is fully covered--however other European languages are not.

So if you only care about German for now, you might be OK. But really, you should migrate to NVARCHAR as soon as possible!

Clafou
  • 15,250
  • 7
  • 58
  • 89
  • 1
    See this post, particularly the answer by Rob, for more information on how to check your encoding: http://stackoverflow.com/questions/5182164/sql-server-default-character-encoding – Clafou Dec 11 '12 at 13:26