"Frank Rizzo" <(E-Mail Removed)> wrote
>I read a string out of a database, which contains serialized objects. How
>can I determine the encoding of the string?
If the datatype that you're using in .Net is a string, then the encoding is
UTF-16. By definition, all .Net strings are UTF-16 encoded.
The only way you can have a different encoding is if you're reading the data
out of the database as a byte array. If you're looking at a byte array, I
don't know of any definitive way to tell the encoding.
--
Chris Mullins, MCSD.NET, MCPD:Enterprise, MVP C#
http://www.coversant.net/blogs/cmullins