Hello,
I am saving different types (image, plain text, html text, sound and
pdf) of content into a database in Byte[] format.
Is UTF8 a correct encoding for all these content types?
UTF-8 is a way to encode unicode characters. You should just store the
bytes to your db without any further encoding (if needed it should have been
encoded earlier, stricly speaking you don't have anything else to do to
store the content than getting it and saving it unchanged in the db). If you
tried something that doesn't work please be explicit on the problem you
get...
Could it be that you save the content in a varchar or text column ? With
SQL Server 2005 or later varbinary(max) is likely the preferred datatype for
blob data.
Another well known option is to store the data outisde of the db in the
filesystem and store its location inside the db. SQL Server 2008 has also
some support for doing this transparently...
Some details could perhaps help to better understand the exact point on
which you need help.