Jon's Blog

.NET Development & More

Source Safe: The character encodings on these files are different. Only files with the same character encoding can be merged or compared.

We saw the above message in SourceSafe after moving to SQL Server 2008 and then saving the scripts for our tables back to SourceSafe.  It appears that SQL 2008 Management Studio uses a different text encoding than prior versions of Management Studio/Enterprise Manager.

To save your script using a specific text encoding.  You can "Save as.." and then there is an arrow to the right of the Save button.  Click this and select "Save with Encoding...".  Then you can select the specific encoding you need.  In my case I needed to change the encoding from "Western Eurpean (Windows) - Codepage 1252" to "Unicode - Codepage 1200".

 

 

LINQ: Mapping to an Enumerated Type in the LINQ Designer

Below is the syntax you can use in the Properties window of the LINQ Designer to map to an enum.  Set this under the Type property and use the fully qualified name of your enum.

Example: global::MyClassLibrary.MyStuff.MyClassName

Screenshot: