Change encoding (collation?) of SQL Server 2008 R2 to UTF-8
Asked Answered
D

1

8

We'd like to move our Confluence system to a SQL Server 2008 R2. Now, since Confluence uses UTF-8 encoding, I'd need a database using the same encoding (I guess that's the collation?).

There's the command

alter database confluence set collation COLLATION_NAME

Now, as it seems, there is no utf-8, and as I found out SQL Server uses ucs-2 which is basically the same. But I can't figure out what the collation name of ucs-2 would be? Does somebody know about that?

Edit: I do see the difference between encoding and collation now. The Confluence documentation suggests that I should create an schema which relies on UCS-2 (because MS SQL has missing support for UTF-8). I have looked trough the Managment Studio and I found an entry for schemas in the Security directory of the database. However, I can not figure out how to assign UCS-2 encoding to the schema. What do I have to realize this in the Managment Studio to do so (or which query should I use)?

Dowable answered 23/11, 2012 at 12:12 Comment(2)
Check out this other SO question - encoding = what characters do you have and how are they represented vs. collation = how are characters ordered and sorted. And why any collation selected, you can store Unicode in nchar() / nvarchar() columns, while char() / varchar() store non-Unicode charactersWittgenstein
dba.stackexchange.com/questions/7303/… - Here I explained what I found out about the role of collation in multi-lingual databases and UTF-8 / Unicode support.Paronychia
A
4

According to the confluence documentation you should set the collation to SQL_Latin1_General_CP1_CS_AS

We have followed this document and have had a successful confluence deployment on SQL Server 2008 R2:

Database Setup for SQL Server

Ariminum answered 7/11, 2013 at 12:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.