maycil
maycil

Reputation: 764

The character encodings on these files are different error in TFS

There is encoding error between last check in file and old one. How can i know the old check in encoding type.

I use UTF-8 (with signature) in Visiul studio 2008. I can save the encoding in IDE File-> Advanced Save Options. Some vs2008 don't display "Advanced Save Options" in File Tab.How can i display "Advanced Save Options" in File?

Upvotes: 3

Views: 6586

Answers (1)

granth
granth

Reputation: 8939

Inside VS, you can browse to the file in Source Control Explorer, right-click it and choose 'Properties'

From a Visual Studio Command Prompt, you can type: tf properties $/path/to/file.cs and the File Type line will tell you the current encoding. See the Properties Command on MSDN for more info.

When you add a new file, TFS will automatically determine the file encoding based upon these rules:

First, a file with a Unicode byte order mark (BOM) is added as that particular type (UTF-8, UTF-16 big endian, UTF-16 little endian, etc.).

If a file doesn't have a BOM, we check for an unprintable ASCII character in the first 1 kilobyte of the file. If there is no unprintable ASCII character in there, the encoding is set to the current code page being used, which is Windows-1252 on US English Windows systems.

If an unprintable character is detected, the file is detected as being binary. The unprintable ASCII characters detected are in the range of 0 - 0x1F and 0x7F excluding 0x9 (TAB), 0xA (LF), 0xC (FF), 0xD (CR), and 0x1A (^Z).

Upvotes: 4

Related Questions