Klaus Herzberg ( ) writes:
> I come from the "dark side" php/mysql and there often problems with
> character sets (utf-8, latin...) and storing data in datebase.
>
> Exists in the world of dot.net and ms-sql-server similiar problems?
Character conversion is always a problem, if you don't do it right.
> To precise: I have to store xml-data in database. Maybe its better to
> encode (like base64) the strings?
No, that is a not a good idea. SQL Server supports Unicode, and there is
also a native xml type (in SQL 2005). What you should be aware of that
SQL Server does not support UTF-8, but always store Unicode data in
UTF-16.
For character data you should use nchar/nvarchar which is Unicode
and not char/varchar which is the local 8-bit set.
--
Erland Sommarskog, SQL Server MVP, esquel DeleteThis @sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx >> Stay informed about: Problems character sets / special characters dot.Net mssq..