Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git on windows : weird character on first line for C# file

Tags:

git

Using http://code.google.com/p/msysgit/downloads/detail?name=Git-1.7.3.1-preview20101002.exe&can=2&q= GUI when viewing a c# file I get this:

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;

Is + normal characters?

like image 572
user310291 Avatar asked Jan 16 '11 16:01

user310291


2 Answers

 is what the unicode character U+FEFF encoded as UTF-8 looks like when you "assume" the encoding is actually ISO-8859-1 (Latin 1).

U+FEFF is zero-width non-breaking space but this usage is deprecated and is normally used as a byte-order mark (BOM) in character encoding schemes which have multibyte code units as the byte swapped version: U+FFFE is not a valid unicode character.

As UTF-8 is just a sequence of bytes it makes no sense to have a byte order mark but some tools still use the character as a UTF-8 "signature".

like image 183
CB Bailey Avatar answered Oct 05 '22 20:10

CB Bailey


It is the Unicode byte order mark. So the software that is showing you the text is displaying the BOM instead of skipping it.

like image 41
Emond Avatar answered Oct 05 '22 18:10

Emond